From: Anjali Menon <cse.anjalimenon@gmail.com>
To: gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Anjali Menon <cse.anjalimenon@gmail.com>
Subject: [PATCH] staging: android: ion: Fixing NULL comparison style
Date: Thu, 19 Nov 2015 22:29:53 +0530 [thread overview]
Message-ID: <1447952393-8867-1-git-send-email-cse.anjalimenon@gmail.com> (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
next reply other threads:[~2015-11-19 17:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-19 16:59 Anjali Menon [this message]
2015-11-19 17:36 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1447952393-8867-1-git-send-email-cse.anjalimenon@gmail.com \
--to=cse.anjalimenon@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®