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>
This commit is contained in:
Jules Irenge 2019-10-10 22:40:06 +01:00 committed by Greg Kroah-Hartman
parent e311f25e18
commit db4b23d5a8
1 changed files with 1 additions and 1 deletions

View File

@ -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)) {