linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] crypto: ux500 - Fix error return code in hash_hw_final()
@ 2021-05-08  7:00 Zhen Lei
  2021-05-09  0:34 ` Linus Walleij
  2021-05-14 11:36 ` Herbert Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Zhen Lei @ 2021-05-08  7:00 UTC (permalink / raw)
  To: Herbert Xu, David S . Miller, Andreas Westin, Linus Walleij,
	linux-crypto, linux-kernel
  Cc: Zhen Lei

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>
---
 drivers/crypto/ux500/hash/hash_core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/crypto/ux500/hash/hash_core.c b/drivers/crypto/ux500/hash/hash_core.c
index ecb7412e84e3..51a6e1a42434 100644
--- a/drivers/crypto/ux500/hash/hash_core.c
+++ b/drivers/crypto/ux500/hash/hash_core.c
@@ -1011,6 +1011,7 @@ static int hash_hw_final(struct ahash_request *req)
 			goto out;
 		}
 	} else if (req->nbytes == 0 && ctx->keylen > 0) {
+		ret = -EPERM;
 		dev_err(device_data->dev, "%s: Empty message with keylength > 0, NOT supported\n",
 			__func__);
 		goto out;
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] crypto: ux500 - Fix error return code in hash_hw_final()
  2021-05-08  7:00 [PATCH 1/1] crypto: ux500 - Fix error return code in hash_hw_final() Zhen Lei
@ 2021-05-09  0:34 ` Linus Walleij
  2021-05-14 11:36 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2021-05-09  0:34 UTC (permalink / raw)
  To: Zhen Lei
  Cc: Herbert Xu, David S . Miller, Andreas Westin, linux-crypto, linux-kernel

On Sat, May 8, 2021 at 9:01 AM Zhen Lei <thunder.leizhen@huawei.com> wrote:

> 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>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] crypto: ux500 - Fix error return code in hash_hw_final()
  2021-05-08  7:00 [PATCH 1/1] crypto: ux500 - Fix error return code in hash_hw_final() Zhen Lei
  2021-05-09  0:34 ` Linus Walleij
@ 2021-05-14 11:36 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2021-05-14 11:36 UTC (permalink / raw)
  To: Zhen Lei
  Cc: David S . Miller, Andreas Westin, Linus Walleij, linux-crypto,
	linux-kernel

On Sat, May 08, 2021 at 03:00:49PM +0800, Zhen Lei wrote:
> 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>
> ---
>  drivers/crypto/ux500/hash/hash_core.c | 1 +
>  1 file changed, 1 insertion(+)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-14 11:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-08  7:00 [PATCH 1/1] crypto: ux500 - Fix error return code in hash_hw_final() Zhen Lei
2021-05-09  0:34 ` Linus Walleij
2021-05-14 11:36 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).