diff mbox series

scsi: pm80xx: Fix error return in pm8001_pci_probe

Message ID 20201109160322.1938811-1-zhangqilong3@huawei.com (mailing list archive)
State Accepted
Headers show
Series scsi: pm80xx: Fix error return in pm8001_pci_probe | expand

Commit Message

Zhang Qilong Nov. 9, 2020, 4:03 p.m. UTC
Forget to set error code when pm8001_configure_phy_settings failed.
We fixed it by using rc to store return value of
pm8001_configure_phy_settings.

Fixes: 279094079a442 ("[SCSI] pm80xx: Phy settings support for motherboard controller.")
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
---
 drivers/scsi/pm8001/pm8001_init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Martin K. Petersen Dec. 7, 2020, 10:35 p.m. UTC | #1
Zhang,

> Forget to set error code when pm8001_configure_phy_settings failed.
> We fixed it by using rc to store return value of
> pm8001_configure_phy_settings.

Applied to 5.11/scsi-staging, thanks!
diff mbox series

Patch

diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index fb471ad3720a..89397e5351ff 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -1131,7 +1131,8 @@  static int pm8001_pci_probe(struct pci_dev *pdev,
 
 	pm8001_init_sas_add(pm8001_ha);
 	/* phy setting support for motherboard controller */
-	if (pm8001_configure_phy_settings(pm8001_ha))
+	rc = pm8001_configure_phy_settings(pm8001_ha);
+	if (rc)
 		goto err_out_shost;
 
 	pm8001_post_sas_ha_init(shost, chip);