projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d775662
)
skge: Adjust a null pointer check in skge_down()
author
Markus Elfring
<
[email protected]
>
Mon, 17 Apr 2017 14:08:39 +0000
(16:08 +0200)
committer
David S. Miller
<
[email protected]
>
Tue, 18 Apr 2017 17:55:10 +0000
(13:55 -0400)
The script "checkpatch.pl" pointed information out like the following.
Comparison to NULL could be written "!skge->mem".
Thus fix the affected source code place.
Signed-off-by: Markus Elfring <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/marvell/skge.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/marvell/skge.c
b/drivers/net/ethernet/marvell/skge.c
index 90bfdbcfd9102f29e7250cfccaf4a53fd5cc77bd..5d7d94de4e00670feeec4f929c87e1cdfdf1a496 100644
(file)
--- a/
drivers/net/ethernet/marvell/skge.c
+++ b/
drivers/net/ethernet/marvell/skge.c
@@
-2657,7
+2657,7
@@
static int skge_down(struct net_device *dev)
struct skge_hw *hw = skge->hw;
int port = skge->port;
- if (
skge->mem == NULL
)
+ if (
!skge->mem
)
return 0;
netif_info(skge, ifdown, skge->netdev, "disabling interface\n");