diff options
author | Chen Zhou <chenzhou10@huawei.com> | 2020-01-21 12:24:55 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-21 14:04:57 +0300 |
commit | d84b99ff69c14a03d76e7fdf9c04895848e6aece (patch) | |
tree | cd95a74fc6f8527d2e7af86063c9ee2c3ef878f4 /drivers/net/ethernet/amd | |
parent | aeaec7bcebd9c85372191fb42a4478d21972d99e (diff) | |
download | linux-d84b99ff69c14a03d76e7fdf9c04895848e6aece.tar.xz |
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: Chen Zhou <chenzhou10@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd')
-rw-r--r-- | drivers/net/ethernet/amd/declance.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/amd/declance.c b/drivers/net/ethernet/amd/declance.c index 6592a2db9efb..7282ce55ffb8 100644 --- a/drivers/net/ethernet/amd/declance.c +++ b/drivers/net/ethernet/amd/declance.c @@ -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) = |