Skip to content

Commit

Permalink
scsi: pm80xx: Fix error return in pm8001_pci_probe()
Browse files Browse the repository at this point in the history
[ Upstream commit 97031cc ]

The driver did not return an error in the case where
pm8001_configure_phy_settings() failed.

Use rc to store the return value of pm8001_configure_phy_settings().

Link: https://lore.kernel.org/r/20201205115551.2079471-1-zhangqilong3@huawei.com
Fixes: 2790940 ("[SCSI] pm80xx: Phy settings support for motherboard controller.")
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Zhang Qilong authored and gregkh committed Dec 30, 2020
1 parent 79e14f1 commit 0b93626
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/scsi/pm8001/pm8001_init.c
Expand Up @@ -1040,7 +1040,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);
Expand Down

0 comments on commit 0b93626

Please sign in to comment.