[RESEND PATCH v1 5/5] staging: qlge: fix comparison to NULL warning
From: Jules Irenge
Date: Thu Oct 10 2019 - 17:40:35 EST
Fix comparison to NULL by replacing with !ptr instead.
Issue detected by checkpatch.
Signed-off-by: Jules Irenge <jbi.octave@xxxxxxxxx>
---
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