diff options
Diffstat (limited to 'drivers/net/usb/ch9200.c')
-rw-r--r-- | drivers/net/usb/ch9200.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/usb/ch9200.c b/drivers/net/usb/ch9200.c index 8a40202c0a17..c4f1c363e24b 100644 --- a/drivers/net/usb/ch9200.c +++ b/drivers/net/usb/ch9200.c | |||
@@ -254,14 +254,9 @@ static struct sk_buff *ch9200_tx_fixup(struct usbnet *dev, struct sk_buff *skb, | |||
254 | tx_overhead = 0x40; | 254 | tx_overhead = 0x40; |
255 | 255 | ||
256 | len = skb->len; | 256 | len = skb->len; |
257 | if (skb_headroom(skb) < tx_overhead) { | 257 | if (skb_cow_head(skb, tx_overhead)) { |
258 | struct sk_buff *skb2; | ||
259 | |||
260 | skb2 = skb_copy_expand(skb, tx_overhead, 0, flags); | ||
261 | dev_kfree_skb_any(skb); | 258 | dev_kfree_skb_any(skb); |
262 | skb = skb2; | 259 | return NULL; |
263 | if (!skb) | ||
264 | return NULL; | ||
265 | } | 260 | } |
266 | 261 | ||
267 | __skb_push(skb, tx_overhead); | 262 | __skb_push(skb, tx_overhead); |