Skip to content

Commit

Permalink
net: c101: replace comparison to NULL with "!card"
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peng Li authored and David S. Miller committed Jun 21, 2021
1 parent 4f7d224 commit 7774318
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wan/c101.c
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7774318

Please sign in to comment.