提交 ea3fb371 编写于 作者: D Dan Carpenter 提交者: David S. Miller

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: NDan Carpenter <error27@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 02a780c0
...@@ -876,9 +876,7 @@ static netdev_tx_t ems_usb_start_xmit(struct sk_buff *skb, struct net_device *ne ...@@ -876,9 +876,7 @@ static netdev_tx_t ems_usb_start_xmit(struct sk_buff *skb, struct net_device *ne
return NETDEV_TX_OK; return NETDEV_TX_OK;
nomem: nomem:
if (skb)
dev_kfree_skb(skb); dev_kfree_skb(skb);
stats->tx_dropped++; stats->tx_dropped++;
return NETDEV_TX_OK; return NETDEV_TX_OK;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册