44 lines
1.6 KiB
Diff
44 lines
1.6 KiB
Diff
From a1d28aa82ab3b030bc0df6b55781f5b0f6d621cc Mon Sep 17 00:00:00 2001
|
|
From: Vladislav Dronov <vdronov@redhat.com>
|
|
Date: Sun, 7 Jun 2026 23:23:19 +0200
|
|
Subject: [PATCH] crypto: tegra - Use int type to store negative error codes
|
|
|
|
JIRA: https://redhat.atlassian.net/browse/RHEL-176465
|
|
Upstream Status: merged into the upstream linux.git
|
|
|
|
commit a710a71cd8ad294937e03b352cd71deb7ad08700
|
|
Author: Qianfeng Rong <rongqianfeng@vivo.com>
|
|
Date: Wed Sep 3 21:25:37 2025 +0800
|
|
|
|
crypto: tegra - Use int type to store negative error codes
|
|
|
|
Change the 'ret' variable in tegra_sha_do_update() from unsigned int to
|
|
int, as it needs to store either negative error codes or zero returned
|
|
by tegra_se_host1x_submit().
|
|
|
|
No effect on runtime.
|
|
|
|
Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
|
|
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
|
|
|
|
Signed-off-by: Vladislav Dronov <vdronov@redhat.com>
|
|
|
|
diff --git a/drivers/crypto/tegra/tegra-se-hash.c b/drivers/crypto/tegra/tegra-se-hash.c
|
|
index e3fe5911a324..79f1e5c9b729 100644
|
|
--- a/drivers/crypto/tegra/tegra-se-hash.c
|
|
+++ b/drivers/crypto/tegra/tegra-se-hash.c
|
|
@@ -401,8 +401,9 @@ static int tegra_sha_do_update(struct ahash_request *req)
|
|
struct tegra_sha_ctx *ctx = crypto_ahash_ctx(crypto_ahash_reqtfm(req));
|
|
struct tegra_sha_reqctx *rctx = ahash_request_ctx(req);
|
|
struct tegra_se *se = ctx->se;
|
|
- unsigned int nblks, nresidue, size, ret;
|
|
+ unsigned int nblks, nresidue, size;
|
|
u32 *cpuvaddr = se->cmdbuf->addr;
|
|
+ int ret;
|
|
|
|
nresidue = (req->nbytes + rctx->residue.size) % rctx->blk_size;
|
|
nblks = (req->nbytes + rctx->residue.size) / rctx->blk_size;
|
|
--
|
|
2.50.1 (Apple Git-155)
|
|
|