diff options
author | Ravikant B Sharma <ravikant.s2@samsung.com> | 2016-12-07 11:47:19 -0800 |
---|---|---|
committer | Sinclair Yeh <syeh@vmware.com> | 2016-12-07 12:09:27 -0800 |
commit | 506e4b75579519d2e2cdb6f9ee7d3d3de6172ef1 (patch) | |
tree | bed54d4dac0d117003c6b581b69e8c5c47896daf /vmwgfx_msg.c | |
parent | 402de77ce76feab3a6cda4c7a0eed3e65188db91 (diff) |
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>
Diffstat (limited to 'vmwgfx_msg.c')
-rw-r--r-- | vmwgfx_msg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vmwgfx_msg.c b/vmwgfx_msg.c index 99de10a..5371c38 100644 --- a/vmwgfx_msg.c +++ b/vmwgfx_msg.c @@ -243,7 +243,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; } @@ -338,7 +338,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; } @@ -398,7 +398,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; } |