diff options
| author | riastradh <riastradh@NetBSD.org> | 2023-05-10 00:12:44 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2023-05-10 00:12:44 +0000 |
| commit | 7a2adfc63b7c00006d39fa375262b4e45c84901c (patch) | |
| tree | 766255511f87934232acce3e26f0b930f8031e48 /sys/dev | |
| parent | a979226241ea85299207c972faabbdc9807969bc (diff) | |
uts(4): Use config_detach_children.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/usb/uts.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/usb/uts.c b/sys/dev/usb/uts.c index 7d193467ad7..ce041774b23 100644 --- a/sys/dev/usb/uts.c +++ b/sys/dev/usb/uts.c @@ -1,4 +1,4 @@ -/* $NetBSD: uts.c,v 1.15 2022/03/28 12:44:17 riastradh Exp $ */ +/* $NetBSD: uts.c,v 1.16 2023/05/10 00:12:44 riastradh Exp $ */ /* * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uts.c,v 1.15 2022/03/28 12:44:17 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uts.c,v 1.16 2023/05/10 00:12:44 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -270,16 +270,17 @@ Static int uts_detach(device_t self, int flags) { struct uts_softc *sc = device_private(self); - int rv = 0; + int error; + __USE(sc); DPRINTF(("uts_detach: sc=%p flags=%d\n", sc, flags)); - if (sc->sc_wsmousedev != NULL) - rv = config_detach(sc->sc_wsmousedev, flags); + error = config_detach_children(self, flags); + if (error) + return error; pmf_device_deregister(self); - - return rv; + return 0; } Static void |
