diff options
author | Peng Li <lipeng321@huawei.com> | 2021-05-25 22:07:57 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-05-25 15:41:54 -0700 |
commit | 2aea27bae89b14e624bdc53a5e5af5a004e68058 (patch) | |
tree | 7f7b4c6323ec9efb2d8d3fbdb3e7f6e88cf90e46 /drivers/net/wan/n2.c | |
parent | 69542276e2b12d2a02af5fb523fe409bd0983f10 (diff) | |
download | linux-stable-2aea27bae89b14e624bdc53a5e5af5a004e68058.tar.gz linux-stable-2aea27bae89b14e624bdc53a5e5af5a004e68058.tar.bz2 linux-stable-2aea27bae89b14e624bdc53a5e5af5a004e68058.zip |
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 <lipeng321@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan/n2.c')
-rw-r--r-- | drivers/net/wan/n2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wan/n2.c b/drivers/net/wan/n2.c index 2f602171cbc6..76ef808c2769 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 |