diff mbox series

scsi: fnic: Return appropriate error code from failure of scsi drv init

Message ID 20250110091842.17711-1-kartilak@cisco.com
State New
Headers show
Series scsi: fnic: Return appropriate error code from failure of scsi drv init | expand

Commit Message

Karan Tilak Kumar Jan. 10, 2025, 9:18 a.m. UTC
Return appropriate error code from fnic_probe caused by failure of
fnic_scsi_drv_init. Fix bug report.

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>
Reviewed-by: Arun Easi <aeasi@cisco.com>
Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com>
---
 drivers/scsi/fnic/fnic_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c
index d366cbca04d5..6eb551112170 100644
--- a/drivers/scsi/fnic/fnic_main.c
+++ b/drivers/scsi/fnic/fnic_main.c
@@ -1039,7 +1039,8 @@  static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	fnic_fdls_init(fnic, (fnic->config.flags & VFCF_FIP_CAPABLE));
 
-	if (fnic_scsi_drv_init(fnic))
+	err = fnic_scsi_drv_init(fnic);
+	if (err)
 		goto err_out_scsi_drv_init;
 
 	err = fnic_stats_debugfs_init(fnic);