[PATCH] via-macii.c: restore_flags on failure

Arnaldo Carvalho de Melo (acme@conectiva.com.br)
Tue, 9 Jan 2001 10:24:04 -0200


Hi,

Please consider applying.

- Arnaldo

--- linux-2.4.0-ac4/drivers/macintosh/via-macii.c Tue Dec 19 11:25:39 2000
+++ linux-2.4.0-ac4.acme/drivers/macintosh/via-macii.c Tue Jan 9 10:18:17 2001
@@ -9,6 +9,9 @@
*
* Rewrite for Unified ADB by Joshua M. Thompson (funaho@jurai.org)
*
+ * Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ * - restore_flags on failure in macii_init - 09/01/2001
+ *
* 1999-08-02 (jmt) - Initial rewrite for Unified ADB.
*/

@@ -147,15 +150,16 @@
cli();

err = macii_init_via();
- if (err) return err;
+ if (err) goto out;

err = request_irq(IRQ_MAC_ADB, macii_interrupt, IRQ_FLG_LOCK, "ADB",
macii_interrupt);
- if (err) return err;
+ if (err) goto out;

macii_state = idle;
- restore_flags(flags);
- return 0;
+ err = 0;
+out: restore_flags(flags);
+ return err;
}

/* initialize the hardware */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/