summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2004-02-02 21:29:39 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2004-02-02 21:29:39 +0000
commit3b17fbfb604559ef138f3075f58ad3864f306099 (patch)
treee5c1ed21a77bfb39267cc7f4c545c6c7d065ad29 /sys/dev
parent0b1d7a45dde482cf9f9f5cd80e8ad4d9dd0a1e56 (diff)
as grange pointed out, BUFQ_ALLOC might fail
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/wd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c
index 8f7d4f75be2..bb65c803715 100644
--- a/sys/dev/ata/wd.c
+++ b/sys/dev/ata/wd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wd.c,v 1.37 2004/01/21 21:00:14 tedu Exp $ */
+/* $OpenBSD: wd.c,v 1.38 2004/02/02 21:29:38 tedu Exp $ */
/* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */
/*
@@ -265,6 +265,10 @@ wdattach(struct device *parent, struct device *self, void *aux)
WDCDEBUG_PRINT(("wdattach\n"), DEBUG_FUNCS | DEBUG_PROBE);
wd->sc_q = BUFQ_ALLOC(0);
+#ifdef DIAGNOSTIC
+ if (wd->sc_q == NULL)
+ return;
+#endif
wd->openings = aa_link->aa_openings;
wd->drvp = aa_link->aa_drv_data;