From: Prasad J Pandit Date: Tue, 6 Nov 2018 05:21:44 +0000 (+0530) Subject: tpm: use loop iterator to set sts data field X-Git-Tag: v3.0.1~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3fd92155fd4e0872f176796589ba3d78261e78b4;p=thirdparty%2Fqemu.git tpm: use loop iterator to set sts data field When TIS request is done, set 'sts' data field across all localities. Signed-off-by: Prasad J Pandit Reviewed-by: Stefan Berger Signed-off-by: Stefan Berger (cherry picked from commit 6a50bb98f24929c9fc69e9197eb21c142e061fbd) Signed-off-by: Michael Roth --- diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c index 12f5c9a7590..d9322692ee6 100644 --- a/hw/tpm/tpm_tis.c +++ b/hw/tpm/tpm_tis.c @@ -295,7 +295,7 @@ static void tpm_tis_request_completed(TPMIf *ti, int ret) if (s->cmd.selftest_done) { for (l = 0; l < TPM_TIS_NUM_LOCALITIES; l++) { - s->loc[locty].sts |= TPM_TIS_STS_SELFTEST_DONE; + s->loc[l].sts |= TPM_TIS_STS_SELFTEST_DONE; } }