summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/lan78xx.c
diff options
context:
space:
mode:
authorAndrzej Hajda <a.hajda@samsung.com>2015-09-21 15:33:59 +0200
committerDavid S. Miller <davem@davemloft.net>2015-09-22 16:14:32 -0700
commit227b9e8708b14a8a26ef67bbbe19b13626df4a35 (patch)
tree2ba3ff492d381c9d5bd6d26f3fd3f42afaef250e /drivers/net/usb/lan78xx.c
parent7e724da64491b20257d46f100bcc6d6214c37b70 (diff)
downloadblackbird-op-linux-227b9e8708b14a8a26ef67bbbe19b13626df4a35.tar.gz
blackbird-op-linux-227b9e8708b14a8a26ef67bbbe19b13626df4a35.zip
usbnet: remove invalid check
skb->len is always non-negative. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/lan78xx.c')
-rw-r--r--drivers/net/usb/lan78xx.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 6a70a72b565d..d2a5f3f88b13 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -2424,11 +2424,6 @@ static int lan78xx_rx(struct lan78xx_net *dev, struct sk_buff *skb)
skb_pull(skb, align_count);
}
- if (unlikely(skb->len < 0)) {
- netdev_warn(dev->net, "invalid rx length<0 %d", skb->len);
- return 0;
- }
-
return 1;
}
OpenPOWER on IntegriCloud