diff options
author | Yuval Mintz <Yuval.Mintz@qlogic.com> | 2015-06-25 15:19:28 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-06-25 06:30:38 -0700 |
commit | efd38b8f52265a1b0ae08a8ee0048958c7fb820f (patch) | |
tree | 734508161c73454152abb877580e714b5eb8eb01 /drivers/net | |
parent | dc6a20aa3bfcdd23cbc6e2aae79457397e6b6012 (diff) | |
download | linux-efd38b8f52265a1b0ae08a8ee0048958c7fb820f.tar.bz2 |
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')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 1 |
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 caf6b311cdae..76b9052a961c 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; } |