diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-04-17 16:08:39 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-04-18 19:55:10 +0200 |
commit | ca735bd83f2d076a0a9ad8aeeb054737e3e0063f (patch) | |
tree | d3d474e0490f2dd29dcb6ecfdf3267f02b8fc306 /drivers/net/ethernet/marvell/skge.c | |
parent | skge: Use seq_puts() in skge_debug_show() (diff) | |
download | linux-ca735bd83f2d076a0a9ad8aeeb054737e3e0063f.tar.xz linux-ca735bd83f2d076a0a9ad8aeeb054737e3e0063f.zip |
skge: Adjust a null pointer check in skge_down()
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 <elfring@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/skge.c')
-rw-r--r-- | drivers/net/ethernet/marvell/skge.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c index 90bfdbcfd910..5d7d94de4e00 100644 --- 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"); |