diff options
Diffstat (limited to 'drivers/char/tpm')
-rw-r--r-- | drivers/char/tpm/tpm.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index 785dce67942f..5c843c9bf819 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c | |||
@@ -147,7 +147,7 @@ ssize_t tpm_show_pcrs(struct device *dev, struct device_attribute *attr, | |||
147 | memcpy(data, cap_pcr, sizeof(cap_pcr)); | 147 | memcpy(data, cap_pcr, sizeof(cap_pcr)); |
148 | if ((len = tpm_transmit(chip, data, sizeof(data))) | 148 | if ((len = tpm_transmit(chip, data, sizeof(data))) |
149 | < CAP_PCR_RESULT_SIZE) { | 149 | < CAP_PCR_RESULT_SIZE) { |
150 | dev_err(&chip->pci_dev->dev, "A TPM error (%d) occurred " | 150 | dev_dbg(&chip->pci_dev->dev, "A TPM error (%d) occurred " |
151 | "attempting to determine the number of PCRS\n", | 151 | "attempting to determine the number of PCRS\n", |
152 | be32_to_cpu(*((__be32 *) (data + 6)))); | 152 | be32_to_cpu(*((__be32 *) (data + 6)))); |
153 | return 0; | 153 | return 0; |
@@ -161,7 +161,7 @@ ssize_t tpm_show_pcrs(struct device *dev, struct device_attribute *attr, | |||
161 | memcpy(data + 10, &index, 4); | 161 | memcpy(data + 10, &index, 4); |
162 | if ((len = tpm_transmit(chip, data, sizeof(data))) | 162 | if ((len = tpm_transmit(chip, data, sizeof(data))) |
163 | < READ_PCR_RESULT_SIZE){ | 163 | < READ_PCR_RESULT_SIZE){ |
164 | dev_err(&chip->pci_dev->dev, "A TPM error (%d) occurred" | 164 | dev_dbg(&chip->pci_dev->dev, "A TPM error (%d) occurred" |
165 | " attempting to read PCR %d of %d\n", | 165 | " attempting to read PCR %d of %d\n", |
166 | be32_to_cpu(*((__be32 *) (data + 6))), i, num_pcrs); | 166 | be32_to_cpu(*((__be32 *) (data + 6))), i, num_pcrs); |
167 | goto out; | 167 | goto out; |
@@ -205,10 +205,11 @@ ssize_t tpm_show_pubek(struct device *dev, struct device_attribute *attr, | |||
205 | 205 | ||
206 | if ((len = tpm_transmit(chip, data, READ_PUBEK_RESULT_SIZE)) < | 206 | if ((len = tpm_transmit(chip, data, READ_PUBEK_RESULT_SIZE)) < |
207 | READ_PUBEK_RESULT_SIZE) { | 207 | READ_PUBEK_RESULT_SIZE) { |
208 | dev_err(&chip->pci_dev->dev, "A TPM error (%d) occurred " | 208 | dev_dbg(&chip->pci_dev->dev, "A TPM error (%d) occurred " |
209 | "attempting to read the PUBEK\n", | 209 | "attempting to read the PUBEK\n", |
210 | be32_to_cpu(*((__be32 *) (data + 6)))); | 210 | be32_to_cpu(*((__be32 *) (data + 6)))); |
211 | return 0; | 211 | rc = 0; |
212 | goto out; | ||
212 | } | 213 | } |
213 | 214 | ||
214 | /* | 215 | /* |
@@ -240,6 +241,7 @@ ssize_t tpm_show_pubek(struct device *dev, struct device_attribute *attr, | |||
240 | str += sprintf(str, "\n"); | 241 | str += sprintf(str, "\n"); |
241 | } | 242 | } |
242 | rc = str - buf; | 243 | rc = str - buf; |
244 | out: | ||
243 | kfree(data); | 245 | kfree(data); |
244 | return rc; | 246 | return rc; |
245 | } | 247 | } |