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; }