Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 858eaca1 authored by James Bottomley's avatar James Bottomley Committed by Linus Torvalds
Browse files

[PATCH] Fix aic7xxx_osm.c compile with older gcc's

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). 
parent a2755a80
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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;