aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/ether.c
diff options
context:
space:
mode:
authorErik Hovland <erik@hovland.org>2007-04-23 13:50:15 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-04-27 16:28:42 -0400
commitb8d297c93a888fcd4d74ba0bbeeabe9b84caf514 (patch)
tree2249461166b9aaa23e21b48fa2b879f32259b49a /drivers/usb/gadget/ether.c
parent83f7d958eab2fbc6b159ee92bf1493924e1d0f72 (diff)
usb ethernet gadget, workaround network stack API glitch
Another workaround for the glitch in the network layer, whereby one call ignores the (otherwise kernel-wide) convention that free() calls should not oops when passed nulls. This code already handles that API glitch in most other paths. From: Erik Hovland <erik@hovland.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/ether.c')
-rw-r--r--drivers/usb/gadget/ether.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 8f9f217e0a68..96df8413f391 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -1735,7 +1735,8 @@ enomem:
1735 defer_kevent (dev, WORK_RX_MEMORY); 1735 defer_kevent (dev, WORK_RX_MEMORY);
1736 if (retval) { 1736 if (retval) {
1737 DEBUG (dev, "rx submit --> %d\n", retval); 1737 DEBUG (dev, "rx submit --> %d\n", retval);
1738 dev_kfree_skb_any (skb); 1738 if (skb)
1739 dev_kfree_skb_any(skb);
1739 spin_lock(&dev->req_lock); 1740 spin_lock(&dev->req_lock);
1740 list_add (&req->list, &dev->rx_reqs); 1741 list_add (&req->list, &dev->rx_reqs);
1741 spin_unlock(&dev->req_lock); 1742 spin_unlock(&dev->req_lock);