提交 658f18d1 编写于 作者: J Jitendra Bhivare 提交者: 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: NJitendra Bhivare <jitendra.bhivare@broadcom.com>
Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册