Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit efd38b8f authored by Yuval Mintz's avatar Yuval Mintz Committed by David S. Miller
Browse files

bnx2x: Release nvram lock on error flow



During an error flow when trying to access the nvram the driver doesn't
release the hw lock it acquired.

Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: default avatarAriel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dc6a20aa
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1230,6 +1230,7 @@ static int bnx2x_acquire_nvram_lock(struct bnx2x *bp)
	if (!(val & (MCPR_NVM_SW_ARB_ARB_ARB1 << port))) {
		DP(BNX2X_MSG_ETHTOOL | BNX2X_MSG_NVM,
		   "cannot get access to nvram interface\n");
		bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_NVRAM);
		return -EBUSY;
	}