diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2019-08-22 21:02:56 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-23 02:22:04 +0300 |
commit | 399e06a517b6f1da5f617d413f6e5489f5054f7a (patch) | |
tree | 6d406a7734d005746d300bd75f332dae2c961b01 /drivers/net/ethernet/smsc | |
parent | 5477fccf9abd7342a987d401fa50c0d93ebd09b9 (diff) | |
download | linux-399e06a517b6f1da5f617d413f6e5489f5054f7a.tar.xz |
ethernet: Delete unnecessary checks before the macro call “dev_kfree_skb”
The dev_kfree_skb() function performs also input parameter validation.
Thus the test around the shown calls is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/smsc')
-rw-r--r-- | drivers/net/ethernet/smsc/smc91x.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c index 601e76ad99a0..3a6761131f4c 100644 --- a/drivers/net/ethernet/smsc/smc91x.c +++ b/drivers/net/ethernet/smsc/smc91x.c @@ -378,8 +378,7 @@ static void smc_shutdown(struct net_device *dev) pending_skb = lp->pending_tx_skb; lp->pending_tx_skb = NULL; spin_unlock_irq(&lp->lock); - if (pending_skb) - dev_kfree_skb(pending_skb); + dev_kfree_skb(pending_skb); /* and tell the card to stay away from that nasty outside world */ SMC_SELECT_BANK(lp, 0); |