Skip to content

Commit

Permalink
usbnet: fix oops in usbnet_start_xmit
Browse files Browse the repository at this point in the history
This patch fixes the bug added in commit v3.1-rc7-1055-gf9b491e
SKB can be NULL at this point, at least for cdc-ncm.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Konstantin Khlebnikov authored and David S. Miller committed Nov 7, 2011
1 parent 0126410 commit 23ba079
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 @@ -1057,7 +1057,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 23ba079

Please sign in to comment.