diff options
author | Dan Carpenter | 2010-03-06 02:11:38 +0100 |
---|---|---|
committer | David S. Miller | 2010-03-08 00:25:50 +0100 |
commit | ea3fb371b2a391958670f2a65e1203f7dba61671 (patch) | |
tree | 99daed8827feb1cd6570033da6936d794ebc3f0f | |
parent | bridge: cleanup: remove unneed check (diff) | |
download | kernel-qcow2-linux-ea3fb371b2a391958670f2a65e1203f7dba61671.tar.gz kernel-qcow2-linux-ea3fb371b2a391958670f2a65e1203f7dba61671.tar.xz kernel-qcow2-linux-ea3fb371b2a391958670f2a65e1203f7dba61671.zip |
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>
-rw-r--r-- | drivers/net/can/usb/ems_usb.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c index 11c87840cc00..33451092b8e8 100644 --- a/drivers/net/can/usb/ems_usb.c +++ b/drivers/net/can/usb/ems_usb.c @@ -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; |