Skip to content

Commit

Permalink
[PATCH] Fix aic7xxx_osm.c compile with older gcc's
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
James Bottomley authored and Linus Torvalds committed Apr 21, 2005
1 parent a2755a8 commit 858eaca
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/scsi/aic7xxx/aic7xxx_osm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 858eaca

Please sign in to comment.