aboutsummaryrefslogtreecommitdiff
path: root/hw/tpm/tpm_tis.c
diff options
context:
space:
mode:
authorStefan Berger <stefanb@linux.vnet.ibm.com>2019-07-25 06:29:39 -0400
committerStefan Berger <stefanb@linux.vnet.ibm.com>2019-07-25 11:04:54 -0400
commitbcfd16fe26d6bb6eabfd2dfb46b9fda59d5493db (patch)
treec1b45294abbcc01fd98c989d7a369650b98c0aab /hw/tpm/tpm_tis.c
parent9d2e1fcd14c2bae5be1992214a03c0ddff714c80 (diff)
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>
Diffstat (limited to 'hw/tpm/tpm_tis.c')
-rw-r--r--hw/tpm/tpm_tis.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index 174618ac30..d6b3212890 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw/tpm/tpm_tis.c
@@ -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 */