summaryrefslogtreecommitdiff
path: root/sys/dev/sbus/dma_sbus.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-03-03 01:41:46 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-03-03 01:41:46 +0000
commit398f76333463e3b823fd242357811314b1b7197f (patch)
tree24a05649da46e15fb245b76b627ba4689c62962f /sys/dev/sbus/dma_sbus.c
parentef616ecd1d0418334dd23097fa6a34999a8cca17 (diff)
Do not let dma attach children if it could not initialize properly.
Diffstat (limited to 'sys/dev/sbus/dma_sbus.c')
-rw-r--r--sys/dev/sbus/dma_sbus.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/sbus/dma_sbus.c b/sys/dev/sbus/dma_sbus.c
index a8795269c88..dab7e6c320e 100644
--- a/sys/dev/sbus/dma_sbus.c
+++ b/sys/dev/sbus/dma_sbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dma_sbus.c,v 1.11 2003/07/03 20:36:07 jason Exp $ */
+/* $OpenBSD: dma_sbus.c,v 1.12 2005/03/03 01:41:45 miod Exp $ */
/* $NetBSD: dma_sbus.c,v 1.5 2000/07/09 20:57:42 pk Exp $ */
/*-
@@ -230,7 +230,8 @@ dmaattach_sbus(parent, self, aux)
sbus_establish(&dsc->sc_sd, &sc->sc_dev);
sbt = dma_alloc_bustag(dsc);
- lsi64854_attach(sc);
+ if (lsi64854_attach(sc) != 0)
+ return;
/* Attach children */
for (node = firstchild(sa->sa_node); node; node = nextsibling(node)) {