]> err.no Git - linux-2.6/commitdiff
[PATCH] Fix aic7xxx_osm.c compile with older gcc's
authorJames Bottomley <James.Bottomley@SteelEye.com>
Thu, 21 Apr 2005 14:35:45 +0000 (07:35 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 21 Apr 2005 14:35:45 +0000 (07:35 -0700)
My version of gcc doesn't warn about this error (declaration in the
middle of a set of statements).

The fix is simple (this also corrects return code; for init functions it
should be zero or error).

drivers/scsi/aic7xxx/aic7xxx_osm.c

index d74b99dab7ec8d11003a176fa4685f2b9f85c4ae..e60f9338e44ad4a2eb938adcc70a491c9a09815d 100644 (file)
@@ -3605,9 +3605,8 @@ ahc_linux_init(void)
        ahc_linux_transport_template = spi_attach_transport(&ahc_linux_transport_functions);
        if (!ahc_linux_transport_template)
                return -ENODEV;
-       int rc = ahc_linux_detect(&aic7xxx_driver_template);
-       if (rc)
-               return rc;
+       if (ahc_linux_detect(&aic7xxx_driver_template))
+               return 0;
        spi_release_transport(ahc_linux_transport_template);
        ahc_linux_exit();
        return -ENODEV;