hwrng: exynos - Signedness bug in exynos_trng_do_read()

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

Fixes: 6cd225cc5d ("hwrng: exynos - add Samsung Exynos True RNG driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Łukasz Stelmach <l.stelmach@samsung.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Dan Carpenter 2018-01-10 12:36:58 +03:00 committed by Herbert Xu
parent 4565da7c39
commit a8bc71d496
1 changed files with 1 additions and 1 deletions

View File

@ -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));