diff mbox series

[2/4] scsi: hisi_sas: Return directly if init hardware failed

Message ID 1573551059-107873-3-git-send-email-john.garry@huawei.com (mailing list archive)
State Mainlined
Commit 547fde8b5a1923050f388caae4f76613b5a620e0
Headers show
Series hisi_sas: Some misc minor patches | expand

Commit Message

John Garry Nov. 12, 2019, 9:30 a.m. UTC
From: Xiang Chen <chenxiang66@hisilicon.com>

Need to return directly if init hardware failed.

Fixes: 73a4925d154c ("scsi: hisi_sas: Update all the registers after suspend and resume")
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
---
 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 1 +
 1 file changed, 1 insertion(+)

Comments

John Garry Nov. 12, 2019, 9:36 a.m. UTC | #1
On 12/11/2019 09:30, John Garry wrote:
> From: Xiang Chen <chenxiang66@hisilicon.com>
> 
> Need to return directly if init hardware failed.
> 
> Fixes: 73a4925d154c ("scsi: hisi_sas: Update all the registers after suspend and resume")
> Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>

I missed my tag here:
Signed-off-by: John Garry <john.garry@huawei.com>

> ---
>   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
> index 2ae7070db41a..b7836406debe 100644
> --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
> +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
> @@ -3432,6 +3432,7 @@ static int hisi_sas_v3_resume(struct pci_dev *pdev)
>   	if (rc) {
>   		scsi_remove_host(shost);
>   		pci_disable_device(pdev);
> +		return rc;
>   	}
>   	hisi_hba->hw->phys_init(hisi_hba);
>   	sas_resume_ha(sha);
>
diff mbox series

Patch

diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
index 2ae7070db41a..b7836406debe 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
@@ -3432,6 +3432,7 @@  static int hisi_sas_v3_resume(struct pci_dev *pdev)
 	if (rc) {
 		scsi_remove_host(shost);
 		pci_disable_device(pdev);
+		return rc;
 	}
 	hisi_hba->hw->phys_init(hisi_hba);
 	sas_resume_ha(sha);