[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1420467923-6397-1-git-send-email-gvercoutere@gmail.com>
Date: Mon, 5 Jan 2015 15:25:23 +0100
From: Guillaume Vercoutere <gvercoutere@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
gvercoutere@...il.com
Subject: [PATCH 2/3] staging: android: Correct NULL comparison style in logger.c
Replace explicit NULL comparison with !
Signed-off-by: Guillaume Vercoutere <gvercoutere@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists