Skip to content

Commit 70dfaf8

Browse files
Su Huimartinkpetersen
authored andcommitted
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 <suhui@nfschina.com> Link: https://lore.kernel.org/r/20231201025955.1584260-3-suhui@nfschina.com Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 573eb4a commit 70dfaf8

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/scsi/aic7xxx/aic7xxx_osm_pci.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,7 @@ ahc_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
241241
ahc_linux_pci_inherit_flags(ahc);
242242

243243
pci_set_drvdata(pdev, ahc);
244-
ahc_linux_register_host(ahc, &aic7xxx_driver_template);
245-
return (0);
244+
return ahc_linux_register_host(ahc, &aic7xxx_driver_template);
246245
}
247246

248247
/******************************* PCI Routines *********************************/

0 commit comments

Comments
 (0)