summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authormsaitoh <msaitoh@NetBSD.org>2017-10-23 09:21:40 +0000
committermsaitoh <msaitoh@NetBSD.org>2017-10-23 09:21:40 +0000
commit20ea040db147704f36cfe128ff2aba61ee6caee4 (patch)
treea8fedc1116147891e51fdbd537a8f4ab46f84919 /sys
parent8b59b6ba248728a7bfe26e8bef3fb7d71f64eb75 (diff)
Return if bah_attach_subr() failed.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amiga/dev/if_bah_zbus.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/arch/amiga/dev/if_bah_zbus.c b/sys/arch/amiga/dev/if_bah_zbus.c
index 1c4d71026ef..39ced10d747 100644
--- a/sys/arch/amiga/dev/if_bah_zbus.c
+++ b/sys/arch/amiga/dev/if_bah_zbus.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bah_zbus.c,v 1.16 2015/10/30 12:19:08 phx Exp $ */
+/* $NetBSD: if_bah_zbus.c,v 1.17 2017/10/23 09:21:40 msaitoh Exp $ */
/*-
* Copyright (c) 1994, 1995, 1998 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
#endif
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bah_zbus.c,v 1.16 2015/10/30 12:19:08 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bah_zbus.c,v 1.17 2017/10/23 09:21:40 msaitoh Exp $");
/*
* Driver frontend for the Commodore Busines Machines and the
@@ -98,6 +98,7 @@ bah_zbus_attach(device_t parent, device_t self, void *aux)
struct bah_zbus_softc *bsc = device_private(self);
struct bah_softc *sc = &bsc->sc_bah;
struct zbus_args *zap = aux;
+ int rv;
sc->sc_dev = self;
#if (defined(BAH_DEBUG) && (BAH_DEBUG > 2))
@@ -115,7 +116,11 @@ bah_zbus_attach(device_t parent, device_t self, void *aux)
sc->sc_reset = bah_zbus_reset;
- bah_attach_subr(sc);
+ rv = bah_attach_subr(sc);
+ if (rv != 0) {
+ aprint_error_dev(self, "bah_attach_subr failed(%d)\n", rv);
+ return;
+ }
bsc->sc_isr.isr_intr = bahintr;
bsc->sc_isr.isr_arg = sc;