summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/softraid.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index f192ae39fb2..3ea83e31c57 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.108 2008/06/12 00:19:15 marco Exp $ */
+/* $OpenBSD: softraid.c,v 1.109 2008/06/12 01:26:16 marco Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -1416,7 +1416,8 @@ sr_shutdown_discipline(struct sr_discipline *sd)
s = splbio();
- shutdownhook_disestablish(sd->sd_shutdownhook);
+ if (sd->sd_shutdownhook)
+ shutdownhook_disestablish(sd->sd_shutdownhook);
/* make sure there isn't a sync pending and yield */
wakeup(sd);