aboutsummaryrefslogtreecommitdiffstats
path: root/net/atm/lec.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/atm/lec.c')
-rw-r--r--net/atm/lec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/atm/lec.c b/net/atm/lec.c
index a7d172105c99..3da125c384ea 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -231,9 +231,11 @@ static netdev_tx_t lec_start_xmit(struct sk_buff *skb,
231 if (skb_headroom(skb) < 2) { 231 if (skb_headroom(skb) < 2) {
232 pr_debug("reallocating skb\n"); 232 pr_debug("reallocating skb\n");
233 skb2 = skb_realloc_headroom(skb, LEC_HEADER_LEN); 233 skb2 = skb_realloc_headroom(skb, LEC_HEADER_LEN);
234 kfree_skb(skb); 234 if (unlikely(!skb2)) {
235 if (skb2 == NULL) 235 kfree_skb(skb);
236 return NETDEV_TX_OK; 236 return NETDEV_TX_OK;
237 }
238 consume_skb(skb);
237 skb = skb2; 239 skb = skb2;
238 } 240 }
239 skb_push(skb, 2); 241 skb_push(skb, 2);