[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1445274471-21673-1-git-send-email-falakreyaz@gmail.com>
Date: Mon, 19 Oct 2015 22:37:51 +0530
From: Muhammad Falak R Wani <falakreyaz@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
<arve@...roid.com>, Riley Andrews <riandrews@...roid.com>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Cc: Muhammad Falak R Wani <falakreyaz@...il.com>
Subject: [PATCH] staging: ion: Remove explicit NULL comparison
Rewrite explicit NULL comparison in its simpler form.
<smpl>
@NULL_REPLACE@
expression e;
@@
-e == NULL
+ !e
Signed-off-by: Muhammad Falak R Wani <falakreyaz@...il.com>
---
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 fd13d05..f5a3f59 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;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists