Module Name:    src
Committed By:   riastradh
Date:           Mon Jun 14 10:21:21 UTC 2021

Modified Files:
        src/sys/dev/pad: pad.c

Log Message:
pad(4): Destroy the callout when done.

Should not be possible for it to be pending or firing at this point,
because we have detached the audio(4) child and so it should have
halted output.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/pad/pad.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pad/pad.c
diff -u src/sys/dev/pad/pad.c:1.71 src/sys/dev/pad/pad.c:1.72
--- src/sys/dev/pad/pad.c:1.71	Mon Jun 14 10:14:58 2021
+++ src/sys/dev/pad/pad.c	Mon Jun 14 10:21:21 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: pad.c,v 1.71 2021/06/14 10:14:58 riastradh Exp $ */
+/* $NetBSD: pad.c,v 1.72 2021/06/14 10:21:21 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcne...@invisible.ca>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.71 2021/06/14 10:14:58 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.72 2021/06/14 10:21:21 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -258,6 +258,7 @@ pad_detach(device_t self, int flags)
 
 	pmf_device_deregister(sc->sc_dev);
 
+	callout_destroy(&sc->sc_pcallout);
 	mutex_destroy(&sc->sc_lock);
 	mutex_destroy(&sc->sc_intr_lock);
 	cv_destroy(&sc->sc_condvar);

Reply via email to