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>
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));