From 561e6c8bfbe0b185b0ec6f3be5c09b91d34f5b42 Mon Sep 17 00:00:00 2001 From: riastradh Date: Wed, 10 May 2023 00:09:54 +0000 Subject: [PATCH] hpf1275a(4): Use config_detach_children. --- sys/dev/hpc/hpf1275a_tty.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sys/dev/hpc/hpf1275a_tty.c b/sys/dev/hpc/hpf1275a_tty.c index 9c3d92bb9e0a..fb115fa62404 100644 --- a/sys/dev/hpc/hpf1275a_tty.c +++ b/sys/dev/hpc/hpf1275a_tty.c @@ -1,4 +1,4 @@ -/* $NetBSD: hpf1275a_tty.c,v 1.32 2022/10/26 23:45:10 riastradh Exp $ */ +/* $NetBSD: hpf1275a_tty.c,v 1.33 2023/05/10 00:09:54 riastradh Exp $ */ /* * Copyright (c) 2004 Valeriy E. Ushakov @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hpf1275a_tty.c,v 1.32 2022/10/26 23:45:10 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpf1275a_tty.c,v 1.33 2023/05/10 00:09:54 riastradh Exp $"); #include "opt_wsdisplay_compat.h" @@ -284,12 +284,11 @@ hpf1275a_detach(device_t self, int flags) struct hpf1275a_softc *sc = device_private(self); int error; - if (sc->sc_wskbd == NULL) - return (0); + error = config_detach_children(self, flags); + if (error) + return error; - error = config_detach(sc->sc_wskbd, 0); - - return (error); + return 0; }