]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
scsi: hisi_sas: Return directly if init hardware failed
authorXiang Chen <chenxiang66@hisilicon.com>
Tue, 12 Nov 2019 09:30:57 +0000 (17:30 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 13 Nov 2019 03:21:34 +0000 (22:21 -0500)
Need to return directly if init hardware failed.

Fixes: 73a4925d154c ("scsi: hisi_sas: Update all the registers after suspend and resume")
Link: https://lore.kernel.org/r/1573551059-107873-3-git-send-email-john.garry@huawei.com
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c

index 2ae7070db41a268c0c599f390b99ae029a760c27..b7836406debec33525ee8cbb0df279f1aaebfa63 100644 (file)
@@ -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);