tpmdd updates for Linux v5.13
KEYS: trusted: Fix missing null return from kzalloc call

The kzalloc call can return null with the GFP_KERNEL flag so
add a null check and exit via a new error exit label. Use the
same exit error label for another error path too.

Addresses-Coverity: ("Dereference null return value")
Fixes: 830027e2cb55 ("KEYS: trusted: Add generic trusted keys framework")
Signed-off-by: Colin Ian King <>
Reviewed-by: Sumit Garg <>
Reviewed-by: Jarkko Sakkinen <>
Signed-off-by: Jarkko Sakkinen <>
1 file changed