diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/tpm/tpm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index b0603b2e5684..32b957efa420 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c | |||
@@ -696,7 +696,7 @@ int __tpm_pcr_read(struct tpm_chip *chip, int pcr_idx, u8 *res_buf) | |||
696 | 696 | ||
697 | cmd.header.in = pcrread_header; | 697 | cmd.header.in = pcrread_header; |
698 | cmd.params.pcrread_in.pcr_idx = cpu_to_be32(pcr_idx); | 698 | cmd.params.pcrread_in.pcr_idx = cpu_to_be32(pcr_idx); |
699 | BUILD_BUG_ON(cmd.header.in.length > READ_PCR_RESULT_SIZE); | 699 | BUG_ON(cmd.header.in.length > READ_PCR_RESULT_SIZE); |
700 | rc = transmit_cmd(chip, &cmd, cmd.header.in.length, | 700 | rc = transmit_cmd(chip, &cmd, cmd.header.in.length, |
701 | "attempting to read a pcr value"); | 701 | "attempting to read a pcr value"); |
702 | 702 | ||
@@ -760,7 +760,7 @@ int tpm_pcr_extend(u32 chip_num, int pcr_idx, const u8 *hash) | |||
760 | return -ENODEV; | 760 | return -ENODEV; |
761 | 761 | ||
762 | cmd.header.in = pcrextend_header; | 762 | cmd.header.in = pcrextend_header; |
763 | BUILD_BUG_ON(be32_to_cpu(cmd.header.in.length) > EXTEND_PCR_SIZE); | 763 | BUG_ON(be32_to_cpu(cmd.header.in.length) > EXTEND_PCR_SIZE); |
764 | cmd.params.pcrextend_in.pcr_idx = cpu_to_be32(pcr_idx); | 764 | cmd.params.pcrextend_in.pcr_idx = cpu_to_be32(pcr_idx); |
765 | memcpy(cmd.params.pcrextend_in.hash, hash, TPM_DIGEST_SIZE); | 765 | memcpy(cmd.params.pcrextend_in.hash, hash, TPM_DIGEST_SIZE); |
766 | rc = transmit_cmd(chip, &cmd, cmd.header.in.length, | 766 | rc = transmit_cmd(chip, &cmd, cmd.header.in.length, |