mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:17 +00:00
tpm_emulator: print error on error-ignore path
Commit3469a56fa3introduced 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, that3469a56fa3was fixing another commit,42e556fa3f"backends/tpm: Propagate vTPM error on migration failure" and didn't mention it. Fixes:3469a56fa3"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>
This commit is contained in:
committed by
Stefan Berger
parent
0b91040d23
commit
e4244f84b3
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user