ems_usb: cleanup: remove uneeded check
"skb" is alway non-null here, but even if it were null the check isn't needed because dev_kfree_skb() can handle it. This eliminates a smatch warning about dereferencing a variable before checking that it is non-null. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
02a780c014
commit
ea3fb371b2
1 changed files with 1 additions and 3 deletions
|
@ -876,9 +876,7 @@ static netdev_tx_t ems_usb_start_xmit(struct sk_buff *skb, struct net_device *ne
|
|||
return NETDEV_TX_OK;
|
||||
|
||||
nomem:
|
||||
if (skb)
|
||||
dev_kfree_skb(skb);
|
||||
|
||||
dev_kfree_skb(skb);
|
||||
stats->tx_dropped++;
|
||||
|
||||
return NETDEV_TX_OK;
|
||||
|
|
Loading…
Reference in a new issue