diff options
author | 2022-09-07 14:28:10 +0800 | |
---|---|---|
committer | 2022-09-16 10:27:47 +0100 | |
commit | b0b815a356aa4f3352563b3350a7b2354c0f2c5c (patch) | |
tree | ad8aca9339484b68bfdd66c280d04de293a488e5 /drivers/net/ethernet/amd/sun3lance.c | |
parent | vsock/vmci: fix repeated words in comments (diff) | |
download | linux-dev-b0b815a356aa4f3352563b3350a7b2354c0f2c5c.tar.xz linux-dev-b0b815a356aa4f3352563b3350a7b2354c0f2c5c.zip |
net: amd: Unified the comparison between pointers and NULL to the same writing
Using the unified way to compare pointers and NULL, which cleans the static
warning.
eg:
if (skb == NULL) --> if (!skb)
if (skb != NULL) --> if (skb)
Signed-off-by: Guofeng Yue <yueguofeng@hisilicon.com>
Signed-off-by: Haoyue Xu <xuhaoyue1@hisilicon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd/sun3lance.c')
-rw-r--r-- | drivers/net/ethernet/amd/sun3lance.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/amd/sun3lance.c b/drivers/net/ethernet/amd/sun3lance.c index 007bd7787291..246f34c43765 100644 --- a/drivers/net/ethernet/amd/sun3lance.c +++ b/drivers/net/ethernet/amd/sun3lance.c @@ -341,7 +341,7 @@ static int __init lance_probe( struct net_device *dev) /* XXX - leak? */ MEM = dvma_malloc_align(sizeof(struct lance_memory), 0x10000); - if (MEM == NULL) { + if (!MEM) { #ifdef CONFIG_SUN3 iounmap((void __iomem *)ioaddr); #endif @@ -796,7 +796,7 @@ static int lance_rx( struct net_device *dev ) } else { skb = netdev_alloc_skb(dev, pkt_len + 2); - if (skb == NULL) { + if (!skb) { dev->stats.rx_dropped++; head->msg_length = 0; head->flag |= RMD1_OWN_CHIP; |