From: Peng Li Date: Tue, 25 May 2021 14:07:57 +0000 (+0800) Subject: net: wan: replace comparison to NULL with "!card" X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2aea27bae89b14e624bdc53a5e5af5a004e68058;p=linux.git net: wan: replace comparison to NULL with "!card" According to the chackpatch.pl, comparison to NULL could be written "!card". Signed-off-by: Peng Li Signed-off-by: Guangbin Huang Signed-off-by: David S. Miller --- diff --git a/drivers/net/wan/n2.c b/drivers/net/wan/n2.c index 2f602171cbc65..76ef808c27697 100644 --- a/drivers/net/wan/n2.c +++ b/drivers/net/wan/n2.c @@ -335,7 +335,7 @@ static int __init n2_run(unsigned long io, unsigned long irq, } card = kzalloc(sizeof(card_t), GFP_KERNEL); - if (card == NULL) + if (!card) return -ENOBUFS; card->ports[0].dev = alloc_hdlcdev(&card->ports[0]); @@ -469,7 +469,7 @@ static int __init n2_run(unsigned long io, unsigned long irq, static int __init n2_init(void) { - if (hw==NULL) { + if (!hw) { #ifdef MODULE pr_info("no card initialized\n"); #endif