diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2023-07-25 20:57:06 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-07-25 21:54:37 -0400 |
commit | d4e0265345778c623d1fe619075b677731847c34 (patch) | |
tree | 00aec2adacb1d5e9f09f3429e54cbfafdc4e5797 /drivers | |
parent | e65851989001c0c9ba9177564b13b38201c0854c (diff) | |
download | lwn-d4e0265345778c623d1fe619075b677731847c34.tar.gz lwn-d4e0265345778c623d1fe619075b677731847c34.zip |
scsi: pm80xx: Fix error return code in pm8001_pci_probe()
If pm8001_init_sas_add() fails, return error code in pm8001_pci_probe().
Fixes: 14a8f116cdc0 ("scsi: pm80xx: Add GET_NVMD timeout during probe")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20230725125706.566990-1-yangyingliang@huawei.com
Reviewed-by: Igor Pylypiv <ipylypiv@google.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/pm8001/pm8001_init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c index 2e886c1d867d..4995e1ef4e0e 100644 --- a/drivers/scsi/pm8001/pm8001_init.c +++ b/drivers/scsi/pm8001/pm8001_init.c @@ -1181,7 +1181,8 @@ static int pm8001_pci_probe(struct pci_dev *pdev, pm80xx_set_thermal_config(pm8001_ha); } - if (pm8001_init_sas_add(pm8001_ha)) + rc = pm8001_init_sas_add(pm8001_ha); + if (rc) goto err_out_shost; /* phy setting support for motherboard controller */ rc = pm8001_configure_phy_settings(pm8001_ha); |