diff options
author | John W. Linville <linville@tuxdriver.com> | 2005-11-10 12:58:00 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-11-10 12:58:00 -0800 |
commit | b6cbc3b6fe588c0ea1341d10413e12c2a96a6032 (patch) | |
tree | a7d21d29e55f7ce6fd68f32884c1bbdb93eadda9 /drivers/net | |
parent | 2f23c523f32324e5b5f39565cbcb0a8ff8923019 (diff) | |
download | kernel_samsung_aries-b6cbc3b6fe588c0ea1341d10413e12c2a96a6032.zip kernel_samsung_aries-b6cbc3b6fe588c0ea1341d10413e12c2a96a6032.tar.gz kernel_samsung_aries-b6cbc3b6fe588c0ea1341d10413e12c2a96a6032.tar.bz2 |
[BNX2]: check return of dev_alloc_skb in bnx2_test_loopback
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/bnx2.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 65aae28..32267d5 100644 --- 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); |