1
0
Fork 0

MLK-24517-2 crypto: caam - removed unnecessary validation of black key for blob encapsulation

The address of an array is never NULL, so the comparison of
black key array always evaluate the same way.
Remove unnecessary check.

Reported-by: Coverity 10893157
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Franck LENORMAND <franck.lenormand@nxp.com>
(cherry picked from commit 8888926c54e819dd7f5d00bad8abdcb8175e8bf6)
5.4-rM2-2.2.x-imx-squashed
Iuliana Prodan 2020-08-21 17:31:24 +03:00
parent 839c0bb969
commit ef17a97b4b
1 changed files with 1 additions and 1 deletions

View File

@ -379,7 +379,7 @@ int caam_blob_encap(struct device *dev, struct keyblob_info *info)
trusted_key = (info->type >> TAG_OBJ_TK_OFFSET) & 0x1;
/* Validate input data*/
if (!info->black_key || !info->key_mod || !blob)
if (!info->key_mod || !blob)
return -EINVAL;
/* Validate object type - only JDKEK keys are supported */