aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/ether.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/ether.c')
-rw-r--r--drivers/usb/gadget/ether.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 04e6b8508fb6..1dd8b57f4420 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -282,6 +282,9 @@ MODULE_PARM_DESC(host_addr, "Host Ethernet Address");
282#define DEV_CONFIG_CDC 282#define DEV_CONFIG_CDC
283#endif 283#endif
284 284
285#ifdef CONFIG_USB_GADGET_FSL_USB2
286#define DEV_CONFIG_CDC
287#endif
285 288
286/* For CDC-incapable hardware, choose the simple cdc subset. 289/* For CDC-incapable hardware, choose the simple cdc subset.
287 * Anything that talks bulk (without notable bugs) can do this. 290 * Anything that talks bulk (without notable bugs) can do this.
@@ -1735,7 +1738,8 @@ enomem:
1735 defer_kevent (dev, WORK_RX_MEMORY); 1738 defer_kevent (dev, WORK_RX_MEMORY);
1736 if (retval) { 1739 if (retval) {
1737 DEBUG (dev, "rx submit --> %d\n", retval); 1740 DEBUG (dev, "rx submit --> %d\n", retval);
1738 dev_kfree_skb_any (skb); 1741 if (skb)
1742 dev_kfree_skb_any(skb);
1739 spin_lock(&dev->req_lock); 1743 spin_lock(&dev->req_lock);
1740 list_add (&req->list, &dev->rx_reqs); 1744 list_add (&req->list, &dev->rx_reqs);
1741 spin_unlock(&dev->req_lock); 1745 spin_unlock(&dev->req_lock);
@@ -1766,7 +1770,6 @@ static void rx_complete (struct usb_ep *ep, struct usb_request *req)
1766 break; 1770 break;
1767 } 1771 }
1768 1772
1769 skb->dev = dev->net;
1770 skb->protocol = eth_type_trans (skb, dev->net); 1773 skb->protocol = eth_type_trans (skb, dev->net);
1771 dev->stats.rx_packets++; 1774 dev->stats.rx_packets++;
1772 dev->stats.rx_bytes += skb->len; 1775 dev->stats.rx_bytes += skb->len;