summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
diff options
context:
space:
mode:
authorRavikant B Sharma <ravikant.s2@samsung.com>2016-11-08 17:30:31 +0530
committerSinclair Yeh <syeh@vmware.com>2017-07-17 23:40:34 -0700
commit1a4adb05632e902c9819af7c5eeded5243f1dc6c (patch)
tree16e9b70e3f2822f6aed2a3e387e5441803647f39 /drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
parent9ff1beb1d19ffe2b26bf9cd2d33e6073d4f4b5fe (diff)
downloadop-kernel-dev-1a4adb05632e902c9819af7c5eeded5243f1dc6c.zip
op-kernel-dev-1a4adb05632e902c9819af7c5eeded5243f1dc6c.tar.gz
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 c7b53d9..2154257 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,
}
node = kzalloc(sizeof(*node), GFP_KERNEL);
- if (unlikely(node == NULL)) {
+ if (unlikely(!node)) {
DRM_ERROR("Failed to allocate a resource validation "
"entry.\n");
return -ENOMEM;
@@ -452,7 +452,7 @@ static int vmw_resource_relocation_add(struct list_head *list,
struct vmw_resource_relocation *rel;
rel = kmalloc(sizeof(*rel), GFP_KERNEL);
- if (unlikely(rel == NULL)) {
+ if (unlikely(!rel)) {
DRM_ERROR("Failed to allocate a resource relocation.\n");
return -ENOMEM;
}
OpenPOWER on IntegriCloud