diff options
Diffstat (limited to 'sys/dev/pcmcia/if_ray.c')
-rw-r--r-- | sys/dev/pcmcia/if_ray.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/pcmcia/if_ray.c b/sys/dev/pcmcia/if_ray.c index 1f7acae9c00..bf5e1a4712b 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.31 2006/03/25 22:41:46 djm Exp $ */ +/* $OpenBSD: if_ray.c,v 1.32 2006/05/22 20:35:12 krw Exp $ */ /* $NetBSD: if_ray.c,v 1.21 2000/07/05 02:35:54 onoe Exp $ */ /* @@ -717,8 +717,10 @@ ray_detach(self, flags) ether_ifdetach(ifp); if_detach(ifp); - powerhook_disestablish(sc->sc_pwrhook); - shutdownhook_disestablish(sc->sc_sdhook); + if (sc->sc_pwrhook != NULL) + powerhook_disestablish(sc->sc_pwrhook); + if (sc->sc_sdhook != NULL) + shutdownhook_disestablish(sc->sc_sdhook); return (0); } |