skge: Adjust a null pointer check in skge_down()
authorMarkus Elfring <elfring@users.sourceforge.net>
Mon, 17 Apr 2017 14:08:39 +0000 (16:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
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 <elfring@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/skge.c

index 90bfdbc..5d7d94d 100644 (file)
@@ -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");