Commit 378ef21b authored by Margit Schubert-While's avatar Margit Schubert-While Committed by Stephen Hemminger

[PATCH] prism54 missing error check

2004-06-28 Margit Schubert-While <margitsw@t-online.de>

* Missing error check after dev_alloc_skb
parent f0190329
...@@ -156,6 +156,12 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev) ...@@ -156,6 +156,12 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev)
} else { } else {
newskb = newskb =
dev_alloc_skb(init_wds ? skb->len + 6 : skb->len); dev_alloc_skb(init_wds ? skb->len + 6 : skb->len);
if (unlikely(newskb == NULL)) {
printk(KERN_ERR "%s: Cannot allocate skb\n",
ndev->name);
err = -ENOMEM;
goto drop_free;
}
newskb_offset = (4 - (long) newskb->data) & 0x03; newskb_offset = (4 - (long) newskb->data) & 0x03;
/* Check if newskb->data is aligned */ /* Check if newskb->data is aligned */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment