summaryrefslogtreecommitdiff
path: root/drivers/staging/qlge
diff options
context:
space:
mode:
authorJules Irenge <jbi.octave@gmail.com>2019-10-11 00:40:06 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-11 12:07:28 +0300
commitdb4b23d5a898cda286e83fcb3650f0951a235d12 (patch)
treee27925e9123cd1bb0a2170109691b8f1eb70487d /drivers/staging/qlge
parente311f25e186560b0315e66707177ee152e718228 (diff)
downloadlinux-db4b23d5a898cda286e83fcb3650f0951a235d12.tar.xz
staging: qlge: fix comparison to NULL warning
Fix comparison to NULL by replacing with !ptr instead. Issue detected by checkpatch. Signed-off-by: Jules Irenge <jbi.octave@gmail.com> Link: https://lore.kernel.org/r/20191010214006.23677-4-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/qlge')
-rw-r--r--drivers/staging/qlge/qlge_dbg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/qlge/qlge_dbg.c b/drivers/staging/qlge/qlge_dbg.c
index 182a07ae5e61..019b7e6a1b7a 100644
--- a/drivers/staging/qlge/qlge_dbg.c
+++ b/drivers/staging/qlge/qlge_dbg.c
@@ -1805,7 +1805,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)) {