From: Markus Elfring Date: Mon, 17 Apr 2017 14:08:39 +0000 (+0200) Subject: skge: Adjust a null pointer check in skge_down() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ca735bd83f2d076a0a9ad8aeeb054737e3e0063f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- 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");