Return appropriate error code from fnic_probe caused by failure of fnic_scsi_drv_init. Fix bug report. Suggested-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Reviewed-by: Sesidhar Baddela <sebaddel@xxxxxxxxx> Reviewed-by: Arulprabhu Ponnusamy <arulponn@xxxxxxxxx> Reviewed-by: Gian Carlo Boffa <gcboffa@xxxxxxxxx> Reviewed-by: Arun Easi <aeasi@xxxxxxxxx> Signed-off-by: Karan Tilak Kumar <kartilak@xxxxxxxxx> --- drivers/scsi/fnic/fnic_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.47.1