From: Zhang Qilong Date: Mon, 26 Oct 2020 09:12:36 +0000 (+0800) Subject: scsi: aic7xxx: aic79xx: Return negative error when register access fails X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f24a69a43c951fc9e73998ee614ddfa2e04a7912;p=users%2Fhch%2Fblock.git scsi: aic7xxx: aic79xx: Return negative error when register access fails A negative error code should be returned in the error path instead of a positive one. Link: https://lore.kernel.org/r/20201026091236.68561-1-zhangqilong3@huawei.com Signed-off-by: Zhang Qilong Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/aic7xxx/aic79xx_pci.c b/drivers/scsi/aic7xxx/aic79xx_pci.c index 8397ae93f7dd..0edce0ebd944 100644 --- a/drivers/scsi/aic7xxx/aic79xx_pci.c +++ b/drivers/scsi/aic7xxx/aic79xx_pci.c @@ -419,7 +419,7 @@ ahd_pci_test_register_access(struct ahd_softc *ahd) int error; uint8_t hcntrl; - error = EIO; + error = -EIO; /* * Enable PCI error interrupt status, but suppress NMIs diff --git a/drivers/scsi/aic7xxx/aic7xxx_pci.c b/drivers/scsi/aic7xxx/aic7xxx_pci.c index 656f680c7802..cbeca694e883 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_pci.c +++ b/drivers/scsi/aic7xxx/aic7xxx_pci.c @@ -1168,7 +1168,7 @@ ahc_pci_test_register_access(struct ahc_softc *ahc) uint32_t cmd; uint8_t hcntrl; - error = EIO; + error = -EIO; /* * Enable PCI error interrupt status, but suppress NMIs