]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
be2net: add unlock on error path
authorDan Carpenter <error27@gmail.com>
Wed, 26 May 2010 04:46:35 +0000 (04:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 May 2010 07:18:49 +0000 (00:18 -0700)
The unlock accidentally got removed from the error path in dd131e76e5:
"be2net: Bug fix to avoid disabling bottom half during firmware upgrade."

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/benet/be_cmds.c

index 9d11dbf5e4da2d96d941a48c2af51d8bae9bdb57..a4a9cf762441802452851ed30bef97299f57c8de 100644 (file)
@@ -1429,7 +1429,7 @@ int be_cmd_write_flashrom(struct be_adapter *adapter, struct be_dma_mem *cmd,
        wrb = wrb_from_mccq(adapter);
        if (!wrb) {
                status = -EBUSY;
-               goto err;
+               goto err_unlock;
        }
        req = cmd->va;
        sge = nonembedded_sgl(wrb);
@@ -1457,7 +1457,10 @@ int be_cmd_write_flashrom(struct be_adapter *adapter, struct be_dma_mem *cmd,
        else
                status = adapter->flash_status;
 
-err:
+       return status;
+
+err_unlock:
+       spin_unlock_bh(&adapter->mcc_lock);
        return status;
 }