* [patch] be2iscsi: return correct error code in beiscsi_init_port()
@ 2015-01-19 14:42 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2015-01-19 14:42 UTC (permalink / raw)
To: Jayamohan Kallickal; +Cc: James E.J. Bottomley, linux-scsi, kernel-janitors
If hba_setup_cid_tbls() fails then this code should return an error code
but instead the current code returns zero (success).
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index f319340..fe59ae6 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -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);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-01-19 14:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-19 14:42 [patch] be2iscsi: return correct error code in beiscsi_init_port() Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).