projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f7d224
)
net: c101: replace comparison to NULL with "!card"
author
Peng Li
<lipeng321@huawei.com>
Sat, 19 Jun 2021 07:28:37 +0000
(15:28 +0800)
committer
David 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
patch
|
blob
|
history
diff --git
a/drivers/net/wan/c101.c
b/drivers/net/wan/c101.c
index 94b852fa22a19826b566f6a897f905df71e87006..f33192eb95173cfbdcb3bd27311d80ce045a35b7 100644
(file)
--- a/
drivers/net/wan/c101.c
+++ b/
drivers/net/wan/c101.c
@@
-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