Commit e4244f84b3 for qemu.org

commit e4244f84b3482fe491e246118d93c5685d09c166
Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Date:   Tue Feb 3 18:58:41 2026 +0300

    tpm_emulator: print error on error-ignore path

    Commit 3469a56fa3dc985 introduced errp passthrough for many
    errors in the file. But in this specific case in
    tpm_emulator_get_buffer_size(), it simply used errp=NULL, so we lose
    printed error. Let's bring it back

    Note also, that 3469a56fa3dc985 was fixing another commit,
    42e556fa3f7a "backends/tpm: Propagate vTPM error on migration failure"
    and didn't mention it.

    Fixes: 3469a56fa3dc985 "tmp_emulator: improve and fix use of errp"
    Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
    Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
    Reviewed-by: Markus Armbruster <armbru@redhat.com>
    Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>

diff --git a/backends/tpm/tpm_emulator.c b/backends/tpm/tpm_emulator.c
index f52cb4d435..6d8529da3b 100644
--- a/backends/tpm/tpm_emulator.c
+++ b/backends/tpm/tpm_emulator.c
@@ -557,8 +557,10 @@ static TPMVersion tpm_emulator_get_tpm_version(TPMBackend *tb)
 static size_t tpm_emulator_get_buffer_size(TPMBackend *tb)
 {
     size_t actual_size;
+    Error *local_err = NULL;

-    if (tpm_emulator_set_buffer_size(tb, 0, &actual_size, NULL) < 0) {
+    if (tpm_emulator_set_buffer_size(tb, 0, &actual_size, &local_err) < 0) {
+        error_report_err(local_err);
         return 4096;
     }