From: Yuval Mintz Date: Tue, 26 Mar 2013 23:28:03 +0000 (+0000) Subject: bnx2x: Fix AER semaphore release X-Git-Tag: v3.10-rc1~66^2~314 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=60cde81f9dc9d70fa4462f4fefb72a1f27333af8;p=profile%2Fcommon%2Fkernel-common.git bnx2x: Fix AER semaphore release Commit 7fa6f34 "AER revised" erroneously inserted an error-flow in which a semaphore is released even though the attempt to take it has failed. Reported-by: Dan Carpenter Signed-off-by: Yuval Mintz Signed-off-by: Ariel Elior Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index 2c6a2a6..5c5a327 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c @@ -10070,8 +10070,8 @@ static int bnx2x_prev_unload(struct bnx2x *bp) /* If Path is marked by EEH, ignore unload status */ aer = !!(bnx2x_prev_path_get_entry(bp) && bnx2x_prev_path_get_entry(bp)->aer); + up(&bnx2x_prev_sem); } - up(&bnx2x_prev_sem); if (fw == FW_MSG_CODE_DRV_UNLOAD_COMMON || aer) { rc = bnx2x_prev_unload_common(bp);