]> 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>
Thu, 5 Dec 2024 12:52:53 +0000 (13:52 +0100)
commitee36db8e8203420e6d5c42eb9428920c2fc36532
tree1c8c0638d7873560639d87c09573d6dbf2a0affc
parent8a5f46d030f28e926a7a322aab64dceb38c1a17d
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