diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-01-10 10:36:58 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-01-18 12:52:26 +0100 |
commit | a8bc71d4960391f732ec0307ebd69e4a25aaf4d3 (patch) | |
tree | 448d09d0f439b62d600b5e44f2e6d283bd76bf08 /drivers/char | |
parent | hwrng: mediatek - Setup default RNG quality (diff) | |
download | linux-a8bc71d4960391f732ec0307ebd69e4a25aaf4d3.tar.xz linux-a8bc71d4960391f732ec0307ebd69e4a25aaf4d3.zip |
hwrng: exynos - Signedness bug in exynos_trng_do_read()
"val" needs to be signed for the error handling to work.
Fixes: 6cd225cc5d8a ("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>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/hw_random/exynos-trng.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/hw_random/exynos-trng.c b/drivers/char/hw_random/exynos-trng.c index 34d6f51ecbee..f4643e3ec346 100644 --- a/drivers/char/hw_random/exynos-trng.c +++ b/drivers/char/hw_random/exynos-trng.c @@ -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)); |