summaryrefslogtreecommitdiff
path: root/sys/dev/ic/rtl81x9.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ic/rtl81x9.c')
-rw-r--r--sys/dev/ic/rtl81x9.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/ic/rtl81x9.c b/sys/dev/ic/rtl81x9.c
index 874073ea00d..58a014644c9 100644
--- a/sys/dev/ic/rtl81x9.c
+++ b/sys/dev/ic/rtl81x9.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtl81x9.c,v 1.49 2006/04/20 20:31:12 miod Exp $ */
+/* $OpenBSD: rtl81x9.c,v 1.50 2006/05/22 20:35:12 krw Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -1360,8 +1360,10 @@ rl_detach(sc)
ether_ifdetach(ifp);
if_detach(ifp);
- shutdownhook_disestablish(sc->sc_sdhook);
- powerhook_disestablish(sc->sc_pwrhook);
+ if (sc->sc_sdhook != NULL)
+ shutdownhook_disestablish(sc->sc_sdhook);
+ if (sc->sc_pwrhook != NULL)
+ powerhook_disestablish(sc->sc_pwrhook);
return (0);
}