diff options
author | Eilon Greenstein <eilong@broadcom.com> | 2009-08-12 04:23:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-13 02:02:53 -0400 |
commit | 54016b260e873d0d4d30cf1fdbd0cdcf0e26251b (patch) | |
tree | f085950545565ad9df727e937d4ad8d1fada3170 /drivers/net/bnx2x_main.c | |
parent | 5ff7b6d4c129a430e355b2f88162a36d9e058f88 (diff) |
bnx2x: Check unzip return code
Without this check, when running out of memory, we will see PSOD's in
bnx2x_init_fill() when doing a memset(). This is because at that time,
bp->gunzip_buf is not pointing to a valid allocated space.
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x_main.c')
-rw-r--r-- | drivers/net/bnx2x_main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index 59aacd84d7e1..edd7b137b76c 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c | |||
@@ -6512,7 +6512,9 @@ static int bnx2x_init_hw(struct bnx2x *bp, u32 load_code) | |||
6512 | 6512 | ||
6513 | bp->dmae_ready = 0; | 6513 | bp->dmae_ready = 0; |
6514 | mutex_init(&bp->dmae_mutex); | 6514 | mutex_init(&bp->dmae_mutex); |
6515 | bnx2x_gunzip_init(bp); | 6515 | rc = bnx2x_gunzip_init(bp); |
6516 | if (rc) | ||
6517 | return rc; | ||
6516 | 6518 | ||
6517 | switch (load_code) { | 6519 | switch (load_code) { |
6518 | case FW_MSG_CODE_DRV_LOAD_COMMON: | 6520 | case FW_MSG_CODE_DRV_LOAD_COMMON: |