crypto: sahara - improve error handling in sahara_sha_process()
authorOvidiu Panait <ovidiu.panait@windriver.com>
Sun, 24 Dec 2023 08:21:34 +0000 (10:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:18 +0000 (15:35 -0800)
commit3c3eb0f8bb26d0a8c19d778cf4e54e373bb57cd2
tree9402dd58189903e5b0ef87efee7553e4fc49f25b
parentdb6efd4da2eedbb1b243bb42c802014b1e126a67
crypto: sahara - improve error handling in sahara_sha_process()

[ Upstream commit 5deff027fca49a1eb3b20359333cf2ae562a2343 ]

sahara_sha_hw_data_descriptor_create() returns negative error codes on
failure, so make sure the errors are correctly handled / propagated.

Fixes: 5a2bb93f5992 ("crypto: sahara - add support for SHA1/256")
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/sahara.c