提交 a8bc71d4 编写于 作者: D Dan Carpenter 提交者: Herbert Xu

hwrng: exynos - Signedness bug in exynos_trng_do_read()

"val" needs to be signed for the error handling to work.

Fixes: 6cd225cc ("hwrng: exynos - add Samsung Exynos True RNG driver")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NKrzysztof Kozlowski <krzk@kernel.org>
Acked-by: NŁukasz Stelmach <l.stelmach@samsung.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 4565da7c
......@@ -55,7 +55,7 @@ static int exynos_trng_do_read(struct hwrng *rng, void *data, size_t max,
bool wait)
{
struct exynos_trng_dev *trng;
u32 val;
int val;
max = min_t(size_t, max, (EXYNOS_TRNG_FIFO_LEN * 4));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册