summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2023-05-10 00:11:24 +0000
committerriastradh <riastradh@NetBSD.org>2023-05-10 00:11:24 +0000
commit64ec2f5189593e83e3bdfeb717e8d28f20afc481 (patch)
tree7cd56e683ab2ecb75da94ce62508e77bf22587fa /sys/dev
parent7b6e602f9fe78e2585b9fe27d8fe426b6d44b2d4 (diff)
auich(4): Use config_detach_children.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/auich.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/pci/auich.c b/sys/dev/pci/auich.c
index a928124fa58..9ee9aa68610 100644
--- a/sys/dev/pci/auich.c
+++ b/sys/dev/pci/auich.c
@@ -1,4 +1,4 @@
-/* $NetBSD: auich.c,v 1.160 2021/02/06 09:45:17 isaki Exp $ */
+/* $NetBSD: auich.c,v 1.161 2023/05/10 00:11:24 riastradh Exp $ */
/*-
* Copyright (c) 2000, 2004, 2005, 2008 The NetBSD Foundation, Inc.
@@ -111,7 +111,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.160 2021/02/06 09:45:17 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.161 2023/05/10 00:11:24 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -702,10 +702,12 @@ static int
auich_detach(device_t self, int flags)
{
struct auich_softc *sc = device_private(self);
+ int error;
/* audio */
- if (sc->sc_audiodev != NULL)
- config_detach(sc->sc_audiodev, flags);
+ error = config_detach_children(self, flags);
+ if (error)
+ return error;
/* sysctl */
sysctl_teardown(&sc->sc_log);