summaryrefslogtreecommitdiff
path: root/sys/dev/pcmcia/if_ray.c
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2000-09-04 03:11:23 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2000-09-04 03:11:23 +0000
commite1b5609a0d06b7e7662661fb5e5d046b38ce2eca (patch)
treee7158d851002b13d8d60dc5a3347069968700edc /sys/dev/pcmcia/if_ray.c
parent16713e7f0f59156e07ed8ddf44a921bcba2865f7 (diff)
do not panic on detach
Diffstat (limited to 'sys/dev/pcmcia/if_ray.c')
-rw-r--r--sys/dev/pcmcia/if_ray.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/pcmcia/if_ray.c b/sys/dev/pcmcia/if_ray.c
index dcd8423bfbb..94525639f74 100644
--- a/sys/dev/pcmcia/if_ray.c
+++ b/sys/dev/pcmcia/if_ray.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ray.c,v 1.6 2000/06/29 03:15:36 aaron Exp $ */
+/* $OpenBSD: if_ray.c,v 1.7 2000/09/04 03:11:22 mickey Exp $ */
/* $NetBSD: if_ray.c,v 1.19 2000/04/22 22:36:14 thorpej Exp $ */
/*
@@ -691,7 +691,10 @@ ray_activate(dev, act)
case DVACT_DEACTIVATE:
if (ifp->if_flags & IFF_RUNNING)
ray_disable(sc);
- pcmcia_intr_disestablish(sc->sc_pf, sc->sc_ih);
+ if (sc->sc_ih) {
+ pcmcia_intr_disestablish(sc->sc_pf, sc->sc_ih);
+ sc->sc_ih = NULL;
+ }
pcmcia_function_disable(sc->sc_pf);
break;
}
@@ -778,7 +781,7 @@ ray_disable(sc)
if (sc->sc_ih)
pcmcia_intr_disestablish(sc->sc_pf, sc->sc_ih);
- sc->sc_ih = 0;
+ sc->sc_ih = NULL;
}
/*