Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1250938 > unrolled thread
| Started by | Muhammad Falak R Wani <falakreyaz@gmail.com> |
|---|---|
| First post | 2015-10-19 19:10 +0200 |
| Last post | 2015-10-19 19:10 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH] staging: ion: Remove explicit NULL comparison Muhammad Falak R Wani <falakreyaz@gmail.com> - 2015-10-19 19:10 +0200
| From | Muhammad Falak R Wani <falakreyaz@gmail.com> |
|---|---|
| Date | 2015-10-19 19:10 +0200 |
| Subject | [PATCH] staging: ion: Remove explicit NULL comparison |
| Message-ID | <qlm6C-2kd-27@gated-at.bofh.it> |
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> --- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web