mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
Merge "usb: gadget: u_ether: Add skb check in eth_start_xmit"
This commit is contained in:
commit
c786d5a718
1 changed files with 10 additions and 10 deletions
|
|
@ -490,7 +490,7 @@ static netdev_tx_t eth_start_xmit(struct sk_buff *skb,
|
|||
}
|
||||
spin_unlock_irqrestore(&dev->lock, flags);
|
||||
|
||||
if (!in) {
|
||||
if (skb && !in) {
|
||||
dev_kfree_skb_any(skb);
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
|
@ -547,15 +547,15 @@ static netdev_tx_t eth_start_xmit(struct sk_buff *skb,
|
|||
if (dev->port_usb)
|
||||
skb = dev->wrap(dev->port_usb, skb);
|
||||
spin_unlock_irqrestore(&dev->lock, flags);
|
||||
if (!skb) {
|
||||
/* Multi frame CDC protocols may store the frame for
|
||||
* later which is not a dropped frame.
|
||||
*/
|
||||
if (dev->port_usb &&
|
||||
dev->port_usb->supports_multi_frame)
|
||||
goto multiframe;
|
||||
goto drop;
|
||||
}
|
||||
}
|
||||
if (!skb) {
|
||||
/* Multi frame CDC protocols may store the frame for
|
||||
* later which is not a dropped frame.
|
||||
*/
|
||||
if (dev->port_usb &&
|
||||
dev->port_usb->supports_multi_frame)
|
||||
goto multiframe;
|
||||
goto drop;
|
||||
}
|
||||
|
||||
length = skb->len;
|
||||
|
|
|
|||
Loading…
Reference in a new issue