Skip to contentSkip to conversation

be2iscsi: return correct error code in beiscsi_init_port()

PATCH New Dan Carpenter 1 participant 1 message Jan 19, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 be2iscsi: return correct error code in beiscsi_init_port()

If hba_setup_cid_tbls() fails then this code should return an error code but instead the current code returns zero (success).

drivers/scsi/be2iscsi/be_main.c +2 -1
index f319340..fe59ae6 100644
@@ -4458,7 +4458,8 @@ static int beiscsi_init_port(struct beiscsi_hba *phba)
 		goto do_cleanup_ctrlr;
 	}
 
-	if (hba_setup_cid_tbls(phba)) {
+	ret = hba_setup_cid_tbls(phba);
+	if (ret < 0) {
 		beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
 			    "BM_%d : Failed in hba_setup_cid_tbls\n");
 		kfree(phba->io_sgl_hndl_base);