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 <pjp@fedoraproject.org>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
Prasad J Pandit 2018-11-06 10:51:44 +05:30 committed by Stefan Berger
parent cb968d275c
commit 6a50bb98f2

View File

@ -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;
}
}