mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-30 15:44:13 +08:00
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: 8a63b1994c
("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>
This commit is contained in:
parent
06676aa1f4
commit
b013603840
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user