diff options
author | Li Huafei <lihuafei1@huawei.com> | 2024-10-31 19:27:55 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-05 14:01:19 +0100 |
commit | 494eb595a79a17e636ceee4374486485b49dba9f (patch) | |
tree | 65a01eb389b12b0691e192a781363da1080f3b16 /kernel | |
parent | 612d6f84717b2af95c2a40007a428f9734486465 (diff) |
crypto: inside-secure - Fix the return value of safexcel_xcbcmac_cra_init()
[ Upstream commit a10549fcce2913be7dc581562ffd8ea35653853e ]
The commit 320406cb60b6 ("crypto: inside-secure - Replace generic aes
with libaes") replaced crypto_alloc_cipher() with kmalloc(), but did not
modify the handling of the return value. When kmalloc() returns NULL,
PTR_ERR_OR_ZERO(NULL) returns 0, but in fact, the memory allocation has
failed, and -ENOMEM should be returned.
Fixes: 320406cb60b6 ("crypto: inside-secure - Replace generic aes with libaes")
Signed-off-by: Li Huafei <lihuafei1@huawei.com>
Acked-by: Antoine Tenart <atenart@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions