]> www.infradead.org Git - users/willy/linux.git/commitdiff
net: c101: replace comparison to NULL with "!card"
authorPeng Li <lipeng321@huawei.com>
Sat, 19 Jun 2021 07:28:37 +0000 (15:28 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Jun 2021 19:37:28 +0000 (12:37 -0700)
According to the chackpatch.pl, comparison to NULL could
be written "!card".

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wan/c101.c

index 94b852fa22a19826b566f6a897f905df71e87006..f33192eb95173cfbdcb3bd27311d80ce045a35b7 100644 (file)
@@ -307,7 +307,7 @@ static int __init c101_run(unsigned long irq, unsigned long winbase)
        }
 
        card = kzalloc(sizeof(card_t), GFP_KERNEL);
-       if (card == NULL)
+       if (!card)
                return -ENOBUFS;
 
        card->dev = alloc_hdlcdev(card);
@@ -381,7 +381,7 @@ static int __init c101_run(unsigned long irq, unsigned long winbase)
 
 static int __init c101_init(void)
 {
-       if (hw == NULL) {
+       if (!hw) {
 #ifdef MODULE
                pr_info("no card initialized\n");
 #endif