diff options
author | Jules Irenge <jbi.octave@gmail.com> | 2019-10-11 00:40:06 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-11 12:07:28 +0300 |
commit | db4b23d5a898cda286e83fcb3650f0951a235d12 (patch) | |
tree | e27925e9123cd1bb0a2170109691b8f1eb70487d /drivers/staging/qlge | |
parent | e311f25e186560b0315e66707177ee152e718228 (diff) | |
download | linux-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.c | 2 |
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)) { |