staging: ion: Remove explicit NULL comparison
authorMuhammad Falak R Wani <falakreyaz@gmail.com>
Mon, 19 Oct 2015 17:07:51 +0000 (22:37 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Oct 2015 02:26:59 +0000 (19:26 -0700)
Rewrite explicit NULL comparison in its simpler form.
<smpl>
@NULL_REPLACE@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion_heap.c

index e97a2c32ed787063728d9bc6ca930a00a06b1c59..ca15a87f6fd3d7bd0bee4ca7a77ea488bb8656c8 100644 (file)
@@ -56,7 +56,7 @@ void *ion_heap_map_kernel(struct ion_heap *heap,
        vaddr = vmap(pages, npages, VM_MAP, pgprot);
        vfree(pages);
 
-       if (vaddr == NULL)
+       if (!vaddr)
                return ERR_PTR(-ENOMEM);
 
        return vaddr;