mirror of
https://github.com/qemu/qemu.git
synced 2025-01-19 12:03:51 +08:00
tpm: Exit in reset when backend indicates failure
Exit() in the frontend reset function when the backend indicates intialization failure. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
9d2e1fcd14
commit
bcfd16fe26
@ -273,7 +273,9 @@ static void tpm_crb_reset(void *dev)
|
||||
s->be_buffer_size = MIN(tpm_backend_get_buffer_size(s->tpmbe),
|
||||
CRB_CTRL_CMD_SIZE);
|
||||
|
||||
tpm_backend_startup_tpm(s->tpmbe, s->be_buffer_size);
|
||||
if (tpm_backend_startup_tpm(s->tpmbe, s->be_buffer_size) < 0) {
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
static void tpm_crb_realize(DeviceState *dev, Error **errp)
|
||||
|
@ -910,7 +910,9 @@ static void tpm_tis_reset(DeviceState *dev)
|
||||
s->rw_offset = 0;
|
||||
}
|
||||
|
||||
tpm_backend_startup_tpm(s->be_driver, s->be_buffer_size);
|
||||
if (tpm_backend_startup_tpm(s->be_driver, s->be_buffer_size) < 0) {
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* persistent state handling */
|
||||
|
Loading…
Reference in New Issue
Block a user