Linux Kernels

staging: ion: Remove explicit NULL comparison

This change “staging: ion: Remove explicit NULL comparison” (commit cf31378) in Linux kernel is authored by Muhammad Falak R Wani <falakreyaz [at] gmail.com> on Mon Oct 19 22:37:51 2015 +0530.

Description of "staging: ion: Remove explicit NULL comparison"

The change “staging: ion: Remove explicit NULL comparison” introduces changes as follows.

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@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Linux kernel releases containing commit cf31378

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "staging: ion: Remove explicit NULL comparison"

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 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;

The commit for this change in Linux stable tree is cf31378 (patch).

Last modified: 2020/01/11 06:48