diff options
author | Ravikant B Sharma <ravikant.s2@samsung.com> | 2016-11-08 15:00:31 +0300 |
---|---|---|
committer | Sinclair Yeh <syeh@vmware.com> | 2017-07-18 09:40:34 +0300 |
commit | 1a4adb05632e902c9819af7c5eeded5243f1dc6c (patch) | |
tree | 16e9b70e3f2822f6aed2a3e387e5441803647f39 /drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c | |
parent | 9ff1beb1d19ffe2b26bf9cd2d33e6073d4f4b5fe (diff) | |
download | linux-1a4adb05632e902c9819af7c5eeded5243f1dc6c.tar.xz |
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>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c index 1f013d45c9e9..36c7b6c839c0 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c @@ -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; |