|
@@ -575,9 +575,11 @@ duration:
|
|
|
if (rc)
|
|
|
return;
|
|
|
|
|
|
- if (be32_to_cpu(tpm_cmd.header.out.return_code)
|
|
|
- != 3 * sizeof(u32))
|
|
|
+ if (be32_to_cpu(tpm_cmd.header.out.return_code) != 0 ||
|
|
|
+ be32_to_cpu(tpm_cmd.header.out.length)
|
|
|
+ != sizeof(tpm_cmd.header.out) + sizeof(u32) + 3 * sizeof(u32))
|
|
|
return;
|
|
|
+
|
|
|
duration_cap = &tpm_cmd.params.getcap_out.cap.duration;
|
|
|
chip->vendor.duration[TPM_SHORT] =
|
|
|
usecs_to_jiffies(be32_to_cpu(duration_cap->tpm_short));
|