summary refs log tree commit diff stats
path: root/hw/tpm/tpm_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/tpm/tpm_util.c')
-rw-r--r--hw/tpm/tpm_util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/tpm/tpm_util.c b/hw/tpm/tpm_util.c
index c0a0f3d71f..12f19465c5 100644
--- a/hw/tpm/tpm_util.c
+++ b/hw/tpm/tpm_util.c
@@ -357,6 +357,9 @@ void tpm_util_show_buffer(const unsigned char *buffer,
     size_t len, i;
     char *line_buffer, *p;
 
+    if (!trace_event_get_state_backends(TRACE_TPM_UTIL_SHOW_BUFFER)) {
+        return;
+    }
     len = MIN(tpm_cmd_get_size(buffer), buffer_size);
 
     /*