summaryrefslogtreecommitdiffstats
path: root/security/keys/trusted.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2019-09-05 05:40:54 -0400
committerLinus Walleij <linus.walleij@linaro.org>2019-09-05 05:40:54 -0400
commit151a41014bff92f353263cadc051435dc9c3258e (patch)
treeaa082a0745edd5b7051668f455dfc0ee1e4a9de0 /security/keys/trusted.c
parentae0755b56da9db4190288155ea884331993ed51b (diff)
parent089cf7f6ecb266b6a4164919a2e69bd2f938374a (diff)
Merge tag 'v5.3-rc7' into devel
Linux 5.3-rc7
Diffstat (limited to 'security/keys/trusted.c')
-rw-r--r--security/keys/trusted.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/security/keys/trusted.c b/security/keys/trusted.c
index 9a94672e7adc..ade699131065 100644
--- a/security/keys/trusted.c
+++ b/security/keys/trusted.c
@@ -1228,24 +1228,11 @@ hashalg_fail:
1228 1228
1229static int __init init_digests(void) 1229static int __init init_digests(void)
1230{ 1230{
1231 u8 digest[TPM_MAX_DIGEST_SIZE];
1232 int ret;
1233 int i;
1234
1235 ret = tpm_get_random(chip, digest, TPM_MAX_DIGEST_SIZE);
1236 if (ret < 0)
1237 return ret;
1238 if (ret < TPM_MAX_DIGEST_SIZE)
1239 return -EFAULT;
1240
1241 digests = kcalloc(chip->nr_allocated_banks, sizeof(*digests), 1231 digests = kcalloc(chip->nr_allocated_banks, sizeof(*digests),
1242 GFP_KERNEL); 1232 GFP_KERNEL);
1243 if (!digests) 1233 if (!digests)
1244 return -ENOMEM; 1234 return -ENOMEM;
1245 1235
1246 for (i = 0; i < chip->nr_allocated_banks; i++)
1247 memcpy(digests[i].digest, digest, TPM_MAX_DIGEST_SIZE);
1248
1249 return 0; 1236 return 0;
1250} 1237}
1251 1238