mirror of https://gitee.com/openkylin/linux.git
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:
parent
4565da7c39
commit
a8bc71d496
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in New Issue