From: Guillaume Vercoutere <gvercoutere@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
gvercoutere@gmail.com
Subject: [PATCH 2/3] staging: android: Correct NULL comparison style in logger.c
Date: Mon, 5 Jan 2015 15:25:23 +0100 [thread overview]
Message-ID: <1420467923-6397-1-git-send-email-gvercoutere@gmail.com> (raw)
Replace explicit NULL comparison with !
Signed-off-by: Guillaume Vercoutere <gvercoutere@gmail.com>
---
drivers/staging/android/logger.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/android/logger.c b/drivers/staging/android/logger.c
index 59ea1a7..72b804e 100644
--- a/drivers/staging/android/logger.c
+++ b/drivers/staging/android/logger.c
@@ -707,11 +707,11 @@ static int __init create_log(char *log_name, int size)
unsigned char *buffer;
buffer = vmalloc(size);
- if (buffer == NULL)
+ if (!buffer)
return -ENOMEM;
log = kzalloc(sizeof(struct logger_log), GFP_KERNEL);
- if (log == NULL) {
+ if (!log) {
ret = -ENOMEM;
goto out_free_buffer;
}
@@ -719,7 +719,7 @@ static int __init create_log(char *log_name, int size)
log->misc.minor = MISC_DYNAMIC_MINOR;
log->misc.name = kstrdup(log_name, GFP_KERNEL);
- if (log->misc.name == NULL) {
+ if (!log->misc.name) {
ret = -ENOMEM;
goto out_free_log;
}
--
1.7.10.4
next reply other threads:[~2015-01-05 14:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-05 14:25 Guillaume Vercoutere [this message]
2015-01-18 0:18 ` Greg Kroah-Hartman
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=1420467923-6397-1-git-send-email-gvercoutere@gmail.com \
--to=gvercoutere@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®