]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
bnx2x: Release nvram lock on error flow
authorYuval Mintz <Yuval.Mintz@qlogic.com>
Thu, 25 Jun 2015 12:19:28 +0000 (15:19 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Jun 2015 13:30:38 +0000 (06:30 -0700)
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>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c

index caf6b311cdaec462eb473e218afc9f8f75322671..76b9052a961c517978494199d74398264583508c 100644 (file)
@@ -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;
        }