]> git.hungrycats.org Git - linux/commitdiff
[PATCH] fix aic79xx module_init return value when no hardware
authorChristoph Hellwig <hch@lst.de>
Fri, 10 Sep 2004 10:26:42 +0000 (06:26 -0400)
committerChristoph Hellwig <hch@lst.de>
Fri, 10 Sep 2004 10:26:42 +0000 (06:26 -0400)
So much rearranging to just propagate the pci_module_init return value..

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/aic7xxx/aic79xx_osm.c

index 9ce30fe49bbdfd8f6ff8a10ad1c590e05b2e2bc8..6a2bf6cc04bf2d29bc1df8b80e31d4f0896bf9a7 100644 (file)
@@ -851,6 +851,7 @@ ahd_linux_detect(Scsi_Host_Template *template)
 {
        struct  ahd_softc *ahd;
        int     found;
+       int     error = 0;
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
        /*
@@ -902,7 +903,9 @@ ahd_linux_detect(Scsi_Host_Template *template)
        ahd_list_lockinit();
 
 #ifdef CONFIG_PCI
-       ahd_linux_pci_init();
+       error = ahd_linux_pci_init();
+       if (error)
+               return error;
 #endif
 
        /*
@@ -919,7 +922,7 @@ ahd_linux_detect(Scsi_Host_Template *template)
        spin_lock_irq(&io_request_lock);
 #endif
        aic79xx_detect_complete++;
-       return (found);
+       return 0;
 }
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
@@ -5079,7 +5082,7 @@ static int __init
 ahd_linux_init(void)
 {
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-       return (ahd_linux_detect(&aic79xx_driver_template) ? 0 : -ENODEV);
+       return ahd_linux_detect(&aic79xx_driver_template);
 #else
        scsi_register_module(MODULE_SCSI_HA, &aic79xx_driver_template);
        if (aic79xx_driver_template.present == 0) {