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
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user