mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
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>
This commit is contained in:
committed by
Sinclair Yeh
parent
9ff1beb1d1
commit
1a4adb0563
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user