lkml.org 
[lkml]   [2019]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RESEND PATCH v1 5/5] staging: qlge: fix comparison to NULL warning
Date
Fix comparison to NULL by replacing with !ptr instead.
Issue detected by checkpatch.

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
drivers/staging/qlge/qlge_dbg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/qlge/qlge_dbg.c b/drivers/staging/qlge/qlge_dbg.c
index eb993207d224..12a62a6fbb69 100644
--- a/drivers/staging/qlge/qlge_dbg.c
+++ b/drivers/staging/qlge/qlge_dbg.c
@@ -1804,7 +1804,7 @@ void ql_dump_hw_cb(struct ql_adapter *qdev, int size, u32 bit, u16 q_id)
pr_err("%s: Enter\n", __func__);

ptr = kmalloc(size, GFP_ATOMIC);
- if (ptr == NULL)
+ if (!ptr)
return;

if (ql_write_cfg(qdev, ptr, size, bit, q_id)) {
--
2.21.0
\
 
 \ /
  Last update: 2019-10-10 23:41    [W:0.045 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site