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_msg.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_msg.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c b/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c index e57a0bad7a62..59d3fd568d98 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c @@ -244,7 +244,7 @@ static int vmw_recv_msg(struct rpc_channel *channel, void **msg, reply_len = ebx; reply = kzalloc(reply_len + 1, GFP_KERNEL); - if (reply == NULL) { + if (!reply) { DRM_ERROR("Cannot allocate memory for reply\n"); return -ENOMEM; } @@ -340,7 +340,7 @@ int vmw_host_get_guestinfo(const char *guest_info_param, msg_len = strlen(guest_info_param) + strlen("info-get ") + 1; msg = kzalloc(msg_len, GFP_KERNEL); - if (msg == NULL) { + if (!msg) { DRM_ERROR("Cannot allocate memory to get %s", guest_info_param); return -ENOMEM; } @@ -400,7 +400,7 @@ int vmw_host_log(const char *log) msg_len = strlen(log) + strlen("log ") + 1; msg = kzalloc(msg_len, GFP_KERNEL); - if (msg == NULL) { + if (!msg) { DRM_ERROR("Cannot allocate memory for log message\n"); return -ENOMEM; } |