projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f23c52
)
[BNX2]: check return of dev_alloc_skb in bnx2_test_loopback
author
John W. Linville
<linville@tuxdriver.com>
Thu, 10 Nov 2005 20:58:00 +0000
(12:58 -0800)
committer
David S. Miller
<davem@davemloft.net>
Thu, 10 Nov 2005 20:58:00 +0000
(12:58 -0800)
Check return of dev_alloc_skb in bnx2_test_loopback, and handle
appropriately.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bnx2.c
patch
|
blob
|
history
diff --git
a/drivers/net/bnx2.c
b/drivers/net/bnx2.c
index 65aae2828f394e000ea1509d70690666cafeda7e..32267d538b17b764c250af9d70d306519ad63229 100644
(file)
--- a/
drivers/net/bnx2.c
+++ b/
drivers/net/bnx2.c
@@
-3903,6
+3903,8
@@
bnx2_test_loopback(struct bnx2 *bp)
pkt_size = 1514;
skb = dev_alloc_skb(pkt_size);
+ if (!skb)
+ return -ENOMEM;
packet = skb_put(skb, pkt_size);
memcpy(packet, bp->mac_addr, 6);
memset(packet + 6, 0x0, 8);