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
@@ -320,14 +320,14 @@ int vmw_otables_setup(struct vmw_private *dev_priv)
|
||||
|
||||
if (dev_priv->has_dx) {
|
||||
*otables = kmemdup(dx_tables, sizeof(dx_tables), GFP_KERNEL);
|
||||
if (*otables == NULL)
|
||||
if (!(*otables))
|
||||
return -ENOMEM;
|
||||
|
||||
dev_priv->otable_batch.num_otables = ARRAY_SIZE(dx_tables);
|
||||
} else {
|
||||
*otables = kmemdup(pre_dx_tables, sizeof(pre_dx_tables),
|
||||
GFP_KERNEL);
|
||||
if (*otables == NULL)
|
||||
if (!(*otables))
|
||||
return -ENOMEM;
|
||||
|
||||
dev_priv->otable_batch.num_otables = ARRAY_SIZE(pre_dx_tables);
|
||||
@@ -407,7 +407,7 @@ struct vmw_mob *vmw_mob_create(unsigned long data_pages)
|
||||
{
|
||||
struct vmw_mob *mob = kzalloc(sizeof(*mob), GFP_KERNEL);
|
||||
|
||||
if (unlikely(mob == NULL))
|
||||
if (unlikely(!mob))
|
||||
return NULL;
|
||||
|
||||
mob->num_pages = vmw_mob_calculate_pt_pages(data_pages);
|
||||
|
Reference in New Issue
Block a user