Commit e3068520 authored by Gaurav Jain's avatar Gaurav Jain Committed by Herbert Xu

crypto: caam - fix unchecked return value error

error:
Unchecked return value (CHECKED_RETURN)
check_return: Calling sg_miter_next without checking return value

fix:
added check if(!sg_miter_next)

Fixes: 8a2a0dd3 ("crypto: caam - strip input zeros from RSA input buffer")
Signed-off-by: default avatarGaurav Jain <gaurav.jain@nxp.com>
Signed-off-by: default avatarMeenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Reviewed-by: default avatarGaurav Jain <gaurav.jain@nxp.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent b52c8c72
......@@ -225,7 +225,9 @@ static int caam_rsa_count_leading_zeros(struct scatterlist *sgl,
if (len && *buff)
break;
sg_miter_next(&miter);
if (!sg_miter_next(&miter))
break;
buff = miter.addr;
len = miter.length;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment