diff mbox series

scsi: fnic: Propagate scsi error code from fnic_scsi_drv_init

Message ID 20250110091956.17749-1-kartilak@cisco.com
State New
Headers show
Series scsi: fnic: Propagate scsi error code from fnic_scsi_drv_init | expand

Commit Message

Karan Tilak Kumar Jan. 10, 2025, 9:19 a.m. UTC
From: Arun Easi <aeasi@cisco.com>

Propagate scsi_add_host() error instead of returning -1.

Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com>
Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com>
Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com>
Signed-off-by: Arun Easi <aeasi@cisco.com>
Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com>
---
 drivers/scsi/fnic/fnic_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c
index 6880b40507aa..2fc5e9688147 100644
--- a/drivers/scsi/fnic/fnic_main.c
+++ b/drivers/scsi/fnic/fnic_main.c
@@ -637,7 +637,7 @@  static int fnic_scsi_drv_init(struct fnic *fnic)
 	err = scsi_add_host(fnic->host, &pdev->dev);
 	if (err) {
 		dev_err(&fnic->pdev->dev, "fnic: scsi add host failed: aborting\n");
-		return -1;
+		return err;
 	}
 	fc_host_maxframe_size(fnic->host) = iport->max_payload_size;
 	fc_host_dev_loss_tmo(fnic->host) =