]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: bcm - add error check in the ahash_hmac_init function
authorChen Ridong <chenridong@huawei.com>
Mon, 4 Nov 2024 12:17:45 +0000 (12:17 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:50:45 +0000 (19:50 +0100)
commit4ea3e3b761e371102bb1486778e2f8dbc9e37413
tree8f40ec46080a536dcc155854444006c893b5cb66
parent5e959bf234d0e32bcb5d77ab5c99dd3aa95a9faf
crypto: bcm - add error check in the ahash_hmac_init function

[ Upstream commit 19630cf57233e845b6ac57c9c969a4888925467b ]

The ahash_init functions may return fails. The ahash_hmac_init should
not return ok when ahash_init returns error. For an example, ahash_init
will return -ENOMEM when allocation memory is error.

Fixes: 9d12ba86f818 ("crypto: brcm - Add Broadcom SPU driver")
Signed-off-by: Chen Ridong <chenridong@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/bcm/cipher.c