mirror of
https://github.com/torvalds/linux.git
synced 2026-01-12 00:42:35 +08:00
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>
This commit is contained in:
committed by
Herbert Xu
parent
a9a84a853c
commit
a710a71cd8
@@ -400,8 +400,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;
|
||||
|
||||
Reference in New Issue
Block a user