summaryrefslogtreecommitdiff
path: root/security/keys/trusted.c
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2019-10-14 11:29:40 +0200
committerStefan Agner <stefan.agner@toradex.com>2019-10-14 11:29:40 +0200
commitf2fbbb0846d4d0737cd5bbf0e7a6a136f0334c5e (patch)
treebc8a63d51e366fb4d65f6547497e33ad3c3c4869 /security/keys/trusted.c
parent73e1c506b9ffb348af15763d62b3677378bd8d91 (diff)
parenta2fc8ee6676067f27d2f5c6e4d512adff3d9938c (diff)
Merge tag 'v5.3.6' into toradex_5.3.y
This is the 5.3.6 stable release
Diffstat (limited to 'security/keys/trusted.c')
-rw-r--r--security/keys/trusted.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/security/keys/trusted.c b/security/keys/trusted.c
index ade699131065..1fbd77816610 100644
--- a/security/keys/trusted.c
+++ b/security/keys/trusted.c
@@ -1228,11 +1228,16 @@ hashalg_fail:
static int __init init_digests(void)
{
+ int i;
+
digests = kcalloc(chip->nr_allocated_banks, sizeof(*digests),
GFP_KERNEL);
if (!digests)
return -ENOMEM;
+ for (i = 0; i < chip->nr_allocated_banks; i++)
+ digests[i].alg_id = chip->allocated_banks[i].alg_id;
+
return 0;
}