Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: ux500 - Fix error return code in hash_hw_final()

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>

authored by

Zhen Lei and committed by
Herbert Xu
b0136038 06676aa1

+1
+1
drivers/crypto/ux500/hash/hash_core.c
··· 1011 1011 goto out; 1012 1012 } 1013 1013 } else if (req->nbytes == 0 && ctx->keylen > 0) { 1014 + ret = -EPERM; 1014 1015 dev_err(device_data->dev, "%s: Empty message with keylength > 0, NOT supported\n", 1015 1016 __func__); 1016 1017 goto out;