Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Qianfeng Rong and committed by
Herbert Xu
a710a71c a9a84a85

+2 -1
+2 -1
drivers/crypto/tegra/tegra-se-hash.c
··· 400 400 struct tegra_sha_ctx *ctx = crypto_ahash_ctx(crypto_ahash_reqtfm(req)); 401 401 struct tegra_sha_reqctx *rctx = ahash_request_ctx(req); 402 402 struct tegra_se *se = ctx->se; 403 - unsigned int nblks, nresidue, size, ret; 403 + unsigned int nblks, nresidue, size; 404 404 u32 *cpuvaddr = se->cmdbuf->addr; 405 + int ret; 405 406 406 407 nresidue = (req->nbytes + rctx->residue.size) % rctx->blk_size; 407 408 nblks = (req->nbytes + rctx->residue.size) / rctx->blk_size;