Skip to content

Commit f6fe569

Browse files
Oliver Neukumdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d23ff70 commit f6fe569

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/usb/usbnet.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,8 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
10921092
unsigned long flags;
10931093
int retval;
10941094

1095-
skb_tx_timestamp(skb);
1095+
if (skb)
1096+
skb_tx_timestamp(skb);
10961097

10971098
// some devices want funky USB-level framing, for
10981099
// win32 driver (usually) and/or hardware quirks

0 commit comments

Comments
 (0)