projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02a780c
)
ems_usb: cleanup: remove uneeded check
author
Dan Carpenter
<error27@gmail.com>
Sat, 6 Mar 2010 01:11:38 +0000
(
01:11
+0000)
committer
David S. Miller
<davem@davemloft.net>
Sun, 7 Mar 2010 23:25:50 +0000
(15:25 -0800)
"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>
drivers/net/can/usb/ems_usb.c
patch
|
blob
|
history
diff --git
a/drivers/net/can/usb/ems_usb.c
b/drivers/net/can/usb/ems_usb.c
index 11c87840cc00f6a6559d1afa5c286656b4ab3522..33451092b8e8a1c66530686c95577daf770ced61 100644
(file)
--- 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;