If nonemb_cmd->va fails to be allocated, call free_mcc_wrb() to restore the impact caused by alloc_mcc_wrb().
avoid?
…
+++ b/drivers/scsi/be2iscsi/be_mgmt.c @@ -1025,6 +1025,7 @@ unsigned int beiscsi_boot_get_sinfo(struct beiscsi_hba *phba) &nonemb_cmd->dma, GFP_KERNEL); if (!nonemb_cmd->va) {
mutex_unlock(&ctrl->mbox_lock); return 0; }free_mcc_wrb(ctrl, tag);
I suggest to avoid also repeated mutex_unlock() calls in this function implementation.
Regards, Markus