]> 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:47:45 +0000 (19:47 +0100)
commit28f8ffa945f7d7150463e15097ea73b19529d6f5
tree6f75ec18bae72ceb6732ee1147c43dbfccedb9c0
parentdead96e1c748ff84ecac83ea3c5a4d7a2e57e051
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