summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/be2iscsi
diff options
context:
space:
mode:
authorJitendra Bhivare <jitendra.bhivare@broadcom.com>2016-08-26 11:39:08 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2016-08-31 04:26:15 +0200
commit658f18d1b82b9f9d89f7c74cd2bcbc9b33a74870 (patch)
treed592b5abd7b20d73d485a2446ddbed0600d55b91 /drivers/scsi/be2iscsi
parentscsi: be2iscsi: Remove redundant iscsi_wrb desc memset (diff)
downloadlinux-658f18d1b82b9f9d89f7c74cd2bcbc9b33a74870.tar.xz
linux-658f18d1b82b9f9d89f7c74cd2bcbc9b33a74870.zip
scsi: be2iscsi: Add missing unlock for mbox_lock
Julia pointed out beiscsi_boot_get_sinfo does not unlock mbox_lock on nonemb_cmd memory allocation failure. Signed-off-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/be2iscsi')
-rw-r--r--drivers/scsi/be2iscsi/be_mgmt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c
index b9ff9391dda7..aebc4ddb3060 100644
--- a/drivers/scsi/be2iscsi/be_mgmt.c
+++ b/drivers/scsi/be2iscsi/be_mgmt.c
@@ -1085,8 +1085,10 @@ unsigned int beiscsi_boot_get_sinfo(struct beiscsi_hba *phba)
nonemb_cmd->va = pci_alloc_consistent(phba->ctrl.pdev,
sizeof(nonemb_cmd->size),
&nonemb_cmd->dma);
- if (!nonemb_cmd->va)
+ if (!nonemb_cmd->va) {
+ mutex_unlock(&ctrl->mbox_lock);
return 0;
+ }
req = nonemb_cmd->va;
memset(req, 0, sizeof(*req));