aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
diff options
context:
space:
mode:
authorRavikant B Sharma <ravikant.s2@samsung.com>2016-11-08 07:00:31 -0500
committerSinclair Yeh <syeh@vmware.com>2017-07-18 02:40:34 -0400
commit1a4adb05632e902c9819af7c5eeded5243f1dc6c (patch)
tree16e9b70e3f2822f6aed2a3e387e5441803647f39 /drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
parent9ff1beb1d19ffe2b26bf9cd2d33e6073d4f4b5fe (diff)
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_execbuf.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
index c7b53d987f06..2154257c21fa 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
@@ -264,7 +264,7 @@ static int vmw_resource_val_add(struct vmw_sw_context *sw_context,
264 } 264 }
265 265
266 node = kzalloc(sizeof(*node), GFP_KERNEL); 266 node = kzalloc(sizeof(*node), GFP_KERNEL);
267 if (unlikely(node == NULL)) { 267 if (unlikely(!node)) {
268 DRM_ERROR("Failed to allocate a resource validation " 268 DRM_ERROR("Failed to allocate a resource validation "
269 "entry.\n"); 269 "entry.\n");
270 return -ENOMEM; 270 return -ENOMEM;
@@ -452,7 +452,7 @@ static int vmw_resource_relocation_add(struct list_head *list,
452 struct vmw_resource_relocation *rel; 452 struct vmw_resource_relocation *rel;
453 453
454 rel = kmalloc(sizeof(*rel), GFP_KERNEL); 454 rel = kmalloc(sizeof(*rel), GFP_KERNEL);
455 if (unlikely(rel == NULL)) { 455 if (unlikely(!rel)) {
456 DRM_ERROR("Failed to allocate a resource relocation.\n"); 456 DRM_ERROR("Failed to allocate a resource relocation.\n");
457 return -ENOMEM; 457 return -ENOMEM;
458 } 458 }