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: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
dc6a20aa3b
commit
efd38b8f52
1 changed files with 1 additions and 0 deletions
|
@ -1230,6 +1230,7 @@ static int bnx2x_acquire_nvram_lock(struct bnx2x *bp)
|
||||||
if (!(val & (MCPR_NVM_SW_ARB_ARB_ARB1 << port))) {
|
if (!(val & (MCPR_NVM_SW_ARB_ARB_ARB1 << port))) {
|
||||||
DP(BNX2X_MSG_ETHTOOL | BNX2X_MSG_NVM,
|
DP(BNX2X_MSG_ETHTOOL | BNX2X_MSG_NVM,
|
||||||
"cannot get access to nvram interface\n");
|
"cannot get access to nvram interface\n");
|
||||||
|
bnx2x_release_hw_lock(bp, HW_LOCK_RESOURCE_NVRAM);
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue