Commit a710a71c authored by Qianfeng Rong's avatar Qianfeng Rong Committed by Herbert Xu
Browse files

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: default avatarQianfeng Rong <rongqianfeng@vivo.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent a9a84a85
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;