Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1273293

[PATCH] staging: android: ion: Fixing NULL comparison style

From Anjali Menon <cse.anjalimenon@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] staging: android: ion: Fixing NULL comparison style
Date 2015-11-19 18:10 +0100
Message-ID <qwASC-3Lk-11@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Using checkpatch.pl fixed the check.

CHECK: Comparison to NULL could be written "!data"

Signed-off-by: Anjali Menon <cse.anjalimenon@gmail.com>
---
 drivers/staging/android/ion/compat_ion.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/android/ion/compat_ion.c b/drivers/staging/android/ion/compat_ion.c
index a402fda..8a0df9c 100644
--- a/drivers/staging/android/ion/compat_ion.c
+++ b/drivers/staging/android/ion/compat_ion.c
@@ -137,7 +137,7 @@ long compat_ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 
 		data32 = compat_ptr(arg);
 		data = compat_alloc_user_space(sizeof(*data));
-		if (data == NULL)
+		if ("!data" == NULL)
 			return -EFAULT;
 
 		err = compat_get_ion_allocation_data(data32, data);
@@ -156,7 +156,7 @@ long compat_ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 
 		data32 = compat_ptr(arg);
 		data = compat_alloc_user_space(sizeof(*data));
-		if (data == NULL)
+		if ("!data" == NULL)
 			return -EFAULT;
 
 		err = compat_get_ion_handle_data(data32, data);
@@ -173,7 +173,7 @@ long compat_ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 
 		data32 = compat_ptr(arg);
 		data = compat_alloc_user_space(sizeof(*data));
-		if (data == NULL)
+		if ("!data" == NULL)
 			return -EFAULT;
 
 		err = compat_get_ion_custom_data(data32, data);
-- 
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 linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] staging: android: ion: Fixing NULL comparison style Anjali Menon <cse.anjalimenon@gmail.com> - 2015-11-19 18:10 +0100
  Re: [PATCH] staging: android: ion: Fixing NULL comparison style Greg KH <gregkh@linuxfoundation.org> - 2015-11-19 18:40 +0100

csiph-web