]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drivers: net: declance: fix comparing pointer to 0
authorChen Zhou <chenzhou10@huawei.com>
Tue, 21 Jan 2020 09:24:55 +0000 (17:24 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jan 2020 11:04:57 +0000 (12:04 +0100)
Fixes coccicheck warning:

./drivers/net/ethernet/amd/declance.c:611:14-15:
WARNING comparing pointer to 0

Replace "skb == 0" with "!skb".

Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/declance.c

index 6592a2db9efb516d9f30635cc373766c4dc914df..7282ce55ffb8ad75664f69735b45b4f4ce568f5e 100644 (file)
@@ -608,7 +608,7 @@ static int lance_rx(struct net_device *dev)
                        len = (*rds_ptr(rd, mblength, lp->type) & 0xfff) - 4;
                        skb = netdev_alloc_skb(dev, len + 2);
 
-                       if (skb == 0) {
+                       if (!skb) {
                                dev->stats.rx_dropped++;
                                *rds_ptr(rd, mblength, lp->type) = 0;
                                *rds_ptr(rd, rmd1, lp->type) =