Fix a slight buglet in `enable' magic odering, point out by

Chuck Cranor.
This commit is contained in:
thorpej 1999-09-28 22:46:43 +00:00
parent 0bd09380a2
commit 619bd37d4d

View File

@ -1,4 +1,4 @@
/* $NetBSD: mhzc.c,v 1.1 1999/09/28 17:58:55 thorpej Exp $ */
/* $NetBSD: mhzc.c,v 1.2 1999/09/28 22:46:43 thorpej Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -463,13 +463,6 @@ mhzc_enable(sc, flag)
return (0);
}
/*
* Perform any special enable magic necessary.
*/
if (sc->sc_product->mp_enable != NULL &&
(*sc->sc_product->mp_enable)(sc) != 0)
return (1);
/*
* Establish our interrupt handler.
*
@ -493,6 +486,16 @@ mhzc_enable(sc, flag)
return (1);
}
/*
* Perform any special enable magic necessary.
*/
if (sc->sc_product->mp_enable != NULL &&
(*sc->sc_product->mp_enable)(sc) != 0) {
pcmcia_function_disable(sc->sc_pf);
pcmcia_intr_disestablish(sc->sc_pf, sc->sc_ih);
return (1);
}
sc->sc_flags |= flag;
return (0);
}