mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
drm/vmwgfx: Fix NULL pointer comparison
Replace direct comparisons to NULL i.e. 'x == NULL' with '!x'. As per coding standard. Signed-off-by: Ravikant B Sharma <ravikant.s2@samsung.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com> Signed-off-by: Sinclair Yeh <syeh@vmware.com>
This commit is contained in:
parent
9ff1beb1d1
commit
1a4adb0563
11 changed files with 26 additions and 26 deletions
|
@ -205,7 +205,7 @@ int vmw_cmdbuf_res_add(struct vmw_cmdbuf_res_manager *man,
|
|||
int ret;
|
||||
|
||||
cres = kzalloc(sizeof(*cres), GFP_KERNEL);
|
||||
if (unlikely(cres == NULL))
|
||||
if (unlikely(!cres))
|
||||
return -ENOMEM;
|
||||
|
||||
cres->hash.key = user_key | (res_type << 24);
|
||||
|
@ -291,7 +291,7 @@ vmw_cmdbuf_res_man_create(struct vmw_private *dev_priv)
|
|||
int ret;
|
||||
|
||||
man = kzalloc(sizeof(*man), GFP_KERNEL);
|
||||
if (man == NULL)
|
||||
if (!man)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
man->dev_priv = dev_priv;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue