Hi Stefan
On Sat, Nov 11, 2017 at 4:39 AM, Stefan Berger
<address@hidden> wrote:
Rather than returning ~0, return 0 for every register in case of
failure mode. The '0' is better to indicate that there's no device
there.
Signed-off-by: Stefan Berger <address@hidden>
---
hw/tpm/tpm_tis.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index eca3374..d0bdd96 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw/tpm/tpm_tis.c
@@ -519,7 +519,7 @@ static uint64_t tpm_tis_mmio_read(void *opaque, hwaddr addr,
uint8_t v;
if (tpm_backend_had_startup_error(s->be_driver)) {
- return val;
+ return 0;
}
it's not obvious to me why it's better. Could you detail a bit more the reason?
why not change the initialization of val instead?