diff options
author | Guofeng Yue <yueguofeng@hisilicon.com> | 2022-09-07 14:28:10 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-09-16 10:27:47 +0100 |
commit | b0b815a356aa4f3352563b3350a7b2354c0f2c5c (patch) | |
tree | ad8aca9339484b68bfdd66c280d04de293a488e5 /drivers/net/ethernet/amd/atarilance.c | |
parent | 454e7b138436a31a17753de58f2178c3e955886c (diff) |
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/atarilance.c')
-rw-r--r-- | drivers/net/ethernet/amd/atarilance.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/amd/atarilance.c b/drivers/net/ethernet/amd/atarilance.c index 27869164c6e6..e5c6d99957cd 100644 --- a/drivers/net/ethernet/amd/atarilance.c +++ b/drivers/net/ethernet/amd/atarilance.c @@ -854,7 +854,7 @@ static irqreturn_t lance_interrupt( int irq, void *dev_id ) int csr0, boguscnt = 10; int handled = 0; - if (dev == NULL) { + if (!dev) { DPRINTK( 1, ( "lance_interrupt(): interrupt for unknown device.\n" )); return IRQ_NONE; } @@ -995,7 +995,7 @@ static int lance_rx( struct net_device *dev ) } else { skb = netdev_alloc_skb(dev, pkt_len + 2); - if (skb == NULL) { + if (!skb) { for( i = 0; i < RX_RING_SIZE; i++ ) if (MEM->rx_head[(entry+i) & RX_RING_MOD_MASK].flag & RMD1_OWN_CHIP) |