From cf31378ba705945fb7b7d6e6c96e47a8a6ce4503 Mon Sep 17 00:00:00 2001 From: Muhammad Falak R Wani Date: Mon, 19 Oct 2015 22:37:51 +0530 Subject: [PATCH] staging: ion: Remove explicit NULL comparison Rewrite explicit NULL comparison in its simpler form. @NULL_REPLACE@ expression e; @@ -e == NULL + !e Signed-off-by: Muhammad Falak R Wani Signed-off-by: Greg Kroah-Hartman --- drivers/staging/android/ion/ion_heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion_heap.c b/drivers/staging/android/ion/ion_heap.c index e97a2c32ed78..ca15a87f6fd3 100644 --- a/drivers/staging/android/ion/ion_heap.c +++ b/drivers/staging/android/ion/ion_heap.c @@ -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; -- 2.20.1