[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <353dd8b8-9922-8e1b-7c88-9cb425010524@users.sourceforge.net>
Date: Sat, 10 Sep 2016 16:32:29 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: kernel-janitors@...r.kernel.org,
Miguel Ojeda Sandonis <miguel.ojeda.sandonis@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH 7/7] cfag12864b: Adjust two checks for null pointers in
cfag12864b_init()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 10 Sep 2016 16:06:19 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The script "checkpatch.pl" can point information out like the following.
Comparison to NULL could be written !…
Thus fix the affected source code places.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/auxdisplay/cfag12864b.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/auxdisplay/cfag12864b.c b/drivers/auxdisplay/cfag12864b.c
index b2533e2..3956b9f 100644
--- a/drivers/auxdisplay/cfag12864b.c
+++ b/drivers/auxdisplay/cfag12864b.c
@@ -338,7 +338,7 @@ static int __init cfag12864b_init(void)
BUILD_BUG_ON(PAGE_SIZE < CFAG12864B_SIZE);
cfag12864b_buffer = (unsigned char *) get_zeroed_page(GFP_KERNEL);
- if (cfag12864b_buffer == NULL) {
+ if (!cfag12864b_buffer) {
printk(KERN_ERR CFAG12864B_NAME ": ERROR: "
"can't get a free page\n");
return -ENOMEM;
@@ -351,7 +351,7 @@ static int __init cfag12864b_init(void)
goto free_buffer;
cfag12864b_workqueue = create_singlethread_workqueue(CFAG12864B_NAME);
- if (cfag12864b_workqueue == NULL)
+ if (!cfag12864b_workqueue)
goto free_cache;
cfag12864b_clear();
--
2.10.0
Powered by blists - more mailing lists