bmac.c: restore_flags on failure
PATCH 1/1 bmac.c: restore_flags on failure
Alan,
I haven't found Randy Gobbel's e-mail, please apply.
- Arnaldo
drivers/net/bmac.c +6 -2
@@ -6,6 +6,8 @@* * May 1999, Al Viro: proper release of /proc/net/bmac entry, switched to * dynamic procfs inode. +* Jan 2001, Arnaldo Carvalho de Melo <[email protected]> +* restore_flags on failure in bmac_reset_and_enable */ #include <linux/config.h> #include <linux/module.h>
@@ -1227,9 +1229,9 @@bmac_reset_chip (dev);if (enable) {if (!bmac_init_tx_ring (bp) || !bmac_init_rx_ring (bp)) -return 0 ; + goto out;if (!bmac_init_chip (dev)) -return 0 ; + goto out;bmac_start_chip (dev);bmwrite (dev,INTDISABLE , EnableNormal); bp->reset_and_enabled =1 ;
@@ -1247,6 +1249,8 @@ }restore_flags (flags);return 1 ; +out:restore_flags (flags); +return 0 ; }static int __init bmac_probe (void )
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/