From: Su Hui Date: Fri, 1 Dec 2023 02:59:55 +0000 (+0800) Subject: scsi: aic7xxx: Return ahc_linux_register_host()'s value rather than zero X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=70dfaf84ec777c0590316a8785df22ca5e97bf10;p=linux.git scsi: aic7xxx: Return ahc_linux_register_host()'s value rather than zero ahc_linux_register_host() can return an error code in case of failure. So ahc_linux_pci_dev_probe() should return the value of ahc_linux_register_host() rather than zero. An earlier commit made ahc_linux_register_host() return negative error codes, which makes sure ahc_linux_pci_dev_probe() returns negative error codes. Signed-off-by: Su Hui Link: https://lore.kernel.org/r/20231201025955.1584260-3-suhui@nfschina.com Reviewed-by: Dan Carpenter Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c index a07e94fac6736..198440dc0918a 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c @@ -241,8 +241,7 @@ ahc_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ahc_linux_pci_inherit_flags(ahc); pci_set_drvdata(pdev, ahc); - ahc_linux_register_host(ahc, &aic7xxx_driver_template); - return (0); + return ahc_linux_register_host(ahc, &aic7xxx_driver_template); } /******************************* PCI Routines *********************************/