Commit d84b99ff authored by Chen Zhou's avatar Chen Zhou Committed by David S. Miller
Browse files

drivers: net: declance: fix comparing pointer to 0



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: default avatarChen Zhou <chenzhou10@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent aeaec7bc
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -608,7 +608,7 @@ static int lance_rx(struct net_device *dev)
			len = (*rds_ptr(rd, mblength, lp->type) & 0xfff) - 4;
			len = (*rds_ptr(rd, mblength, lp->type) & 0xfff) - 4;
			skb = netdev_alloc_skb(dev, len + 2);
			skb = netdev_alloc_skb(dev, len + 2);


			if (skb == 0) {
			if (!skb) {
				dev->stats.rx_dropped++;
				dev->stats.rx_dropped++;
				*rds_ptr(rd, mblength, lp->type) = 0;
				*rds_ptr(rd, mblength, lp->type) = 0;
				*rds_ptr(rd, rmd1, lp->type) =
				*rds_ptr(rd, rmd1, lp->type) =