Skip to content

Commit

Permalink
bnx2x: add missing napi deletion in error path
Browse files Browse the repository at this point in the history
If the hardware initialization fails in bnx2x_nic_load() after adding
napi objects, they would not be deleted. A subsequent attempt to unload
the bnx2x module detects a corruption in the napi list.

Add the missing napi deletion to the error path.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Michal Schmidt authored and David S. Miller committed Mar 17, 2013
1 parent c62dce6 commit 722c6f5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -2760,6 +2760,7 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
bp->port.pmf = 0;
load_error1:
bnx2x_napi_disable(bp);
bnx2x_del_all_napi(bp);

/* clear pf_load status, as it was already set */
if (IS_PF(bp))
Expand Down

0 comments on commit 722c6f5

Please sign in to comment.