Skip to content

Commit

Permalink
Revert "usbnet: drop unneeded check for NULL"
Browse files Browse the repository at this point in the history
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 <oneukum@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Oliver Neukum authored and David S. Miller committed Sep 5, 2012
1 parent d23ff70 commit f6fe569
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/usb/usbnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f6fe569

Please sign in to comment.