summary refs log tree commit diff stats
path: root/hw/core/qdev-clock.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-11-28 13:21:13 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2024-12-10 18:49:24 +0100
commit4cc055039fc1c1ab18f172fa791aa3d48d7d20aa (patch)
treec5cad55830eeb50a00bc8927194394977d80af9f /hw/core/qdev-clock.c
parenta3057c52f45c280bffc22980f535799a12500d66 (diff)
downloadfocaccia-qemu-4cc055039fc1c1ab18f172fa791aa3d48d7d20aa.tar.gz
focaccia-qemu-4cc055039fc1c1ab18f172fa791aa3d48d7d20aa.zip
clock: clear callback on unparent
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/core/qdev-clock.c')
-rw-r--r--hw/core/qdev-clock.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/core/qdev-clock.c b/hw/core/qdev-clock.c
index 82799577f3..ca65685c04 100644
--- a/hw/core/qdev-clock.c
+++ b/hw/core/qdev-clock.c
@@ -87,11 +87,8 @@ void qdev_finalize_clocklist(DeviceState *dev)
         if (!ncl->output && !ncl->alias) {
             /*
              * We kept a reference on the input clock to ensure it lives up to
-             * this point so we can safely remove the callback.
-             * It avoids having a callback to a deleted object if ncl->clock
-             * is still referenced somewhere else (eg: by a clock output).
+             * this point; it is used by the monitor to show the frequency.
              */
-            clock_clear_callback(ncl->clock);
             object_unref(OBJECT(ncl->clock));
         }
         g_free(ncl->name);