Commit 658f18d1 authored by Jitendra Bhivare's avatar Jitendra Bhivare Committed by Martin K. Petersen

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: default avatarJitendra Bhivare <jitendra.bhivare@broadcom.com>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent bf9b7554
...@@ -1085,8 +1085,10 @@ unsigned int beiscsi_boot_get_sinfo(struct beiscsi_hba *phba) ...@@ -1085,8 +1085,10 @@ unsigned int beiscsi_boot_get_sinfo(struct beiscsi_hba *phba)
nonemb_cmd->va = pci_alloc_consistent(phba->ctrl.pdev, nonemb_cmd->va = pci_alloc_consistent(phba->ctrl.pdev,
sizeof(nonemb_cmd->size), sizeof(nonemb_cmd->size),
&nonemb_cmd->dma); &nonemb_cmd->dma);
if (!nonemb_cmd->va) if (!nonemb_cmd->va) {
mutex_unlock(&ctrl->mbox_lock);
return 0; return 0;
}
req = nonemb_cmd->va; req = nonemb_cmd->va;
memset(req, 0, sizeof(*req)); memset(req, 0, sizeof(*req));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment