summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorYuval Mintz <Yuval.Mintz@qlogic.com>2015-06-25 15:19:28 +0300
committerDavid S. Miller <davem@davemloft.net>2015-06-25 06:30:38 -0700
commitefd38b8f52265a1b0ae08a8ee0048958c7fb820f (patch)
tree734508161c73454152abb877580e714b5eb8eb01 /drivers/net/ethernet
parentdc6a20aa3bfcdd23cbc6e2aae79457397e6b6012 (diff)
downloadop-kernel-dev-efd38b8f52265a1b0ae08a8ee0048958c7fb820f.zip
op-kernel-dev-efd38b8f52265a1b0ae08a8ee0048958c7fb820f.tar.gz
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>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
index caf6b31..76b9052 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
@@ -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;
}
OpenPOWER on IntegriCloud