mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 01:34:14 +08:00
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>
This commit is contained in:
parent
bf9b7554f4
commit
658f18d1b8
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user