Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
                                                  &mbox_mem_alloc->dma);
        if (!mbox_mem_alloc->va) {
                beiscsi_unmap_pci_function(phba);
-               status = -ENOMEM;
-               return status;
+               return -ENOMEM;
        }
 
        mbox_mem_align->size = sizeof(struct be_mcc_mailbox);
 error:
        shost_printk(KERN_ERR, phba->shost, "hwi_init_port failed");
        hwi_cleanup(phba);
-       return -ENOMEM;
+       return status;
 }
 
 static int hwi_init_controller(struct beiscsi_hba *phba)
 
 free_init:
        beiscsi_free_mem(phba);
-       return -ENOMEM;
+       return ret;
 }
 
 static int beiscsi_init_sgl_handle(struct beiscsi_hba *phba)