linux/drivers/crypto/inside-secure
Li Huafei 04dcf1ce3b crypto: inside-secure - Fix the return value of safexcel_xcbcmac_cra_init()
[ Upstream commit a10549fcce ]

The commit 320406cb60 ("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: 320406cb60 ("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>
History 2024-12-14 19:53:17 +01:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
safexcel.c crypto: safexcel - Cleanup ring IRQ workqueues on load failure 2023-05-11 23:03:02 +09:00
safexcel.h crypto: inside-secure - fix packed bit-field result descriptor 2022-07-08 15:21:17 +08:00
safexcel_cipher.c crypto: safexcel - Add error handling for dma_map_sg() calls 2024-01-25 15:27:21 -08:00
safexcel_hash.c crypto: inside-secure - Fix the return value of safexcel_xcbcmac_cra_init() 2024-12-14 19:53:17 +01:00
safexcel_ring.c crypto: inside-secure - Prevent missing of processing errors 2020-09-18 17:20:10 +10:00