Skip to content

Commit a710a71

Browse files
qianfengrongherbertx
authored andcommitted
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>
1 parent a9a84a8 commit a710a71

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/crypto/tegra/tegra-se-hash.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,9 @@ static int tegra_sha_do_update(struct ahash_request *req)
400400
struct tegra_sha_ctx *ctx = crypto_ahash_ctx(crypto_ahash_reqtfm(req));
401401
struct tegra_sha_reqctx *rctx = ahash_request_ctx(req);
402402
struct tegra_se *se = ctx->se;
403-
unsigned int nblks, nresidue, size, ret;
403+
unsigned int nblks, nresidue, size;
404404
u32 *cpuvaddr = se->cmdbuf->addr;
405+
int ret;
405406

406407
nresidue = (req->nbytes + rctx->residue.size) % rctx->blk_size;
407408
nblks = (req->nbytes + rctx->residue.size) / rctx->blk_size;

0 commit comments

Comments
 (0)