crypto: ux500 - Fix error return code in hash_hw_final()
authorZhen Lei <thunder.leizhen@huawei.com>
Sat, 8 May 2021 07:00:49 +0000 (15:00 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:56:03 +0000 (16:56 +0200)
commit45d2d67833ae72a145560cfb6ba30c02a10642ad
tree86764e08cf3b75cfd4c36eb5245b9555b9a09cd0
parent8c8c11b4df706307248d0ab637f2601b2520edc0
crypto: ux500 - Fix error return code in hash_hw_final()

[ Upstream commit b01360384009ab066940b45f34880991ea7ccbfb ]

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: 8a63b1994c50 ("crypto: ux500 - Add driver for HASH hardware")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/ux500/hash/hash_core.c