From: Oliver Neukum Date: Wed, 5 Sep 2012 19:22:32 +0000 (+0200) Subject: Revert "usbnet: drop unneeded check for NULL" X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f6fe569fe056388166575af1cfaed0bcbc688305;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Revert "usbnet: drop unneeded check for NULL" This reverts commit 5d65878d7031b6c39054b282faceff406bb2fda9. The upper layers call usbnet_start_xmit() with a valid skb. However cdc_ncm abuses this method by calling it with NULL to trigger IO for the aggregated private skb holding erlier packets. Until cdc_ncm is fixed, the check for NULL must be reintroduced. Signed-off-by: Oliver Neukum Signed-off-by: David S. Miller --- diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 5234d20ef44d..8531c1caac28 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1092,7 +1092,8 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb, unsigned long flags; int retval; - skb_tx_timestamp(skb); + if (skb) + skb_tx_timestamp(skb); // some devices want funky USB-level framing, for // win32 driver (usually) and/or hardware quirks