[PATCH][next] hwrng: exynos: check for -ve error return from readl_poll_timeout

Krzysztof Kozlowski krzk at kernel.org
Mon Jan 15 00:55:43 PST 2018

On Fri, Jan 12, 2018 at 5:30 PM, Colin King <colin.king at canonical.com> wrote:
> From: Colin Ian King <colin.king at canonical.com>
> Currently, the return from readl_poll_timeout is being assigned to
> a u32 and this is being checked for a -ve return which is always
> false since a u32 cannot be less than zero.  Fix this by changing
> val to an int so that error returns can be correctly detected.
> Detected by CoverityScan, CID#1463776 ("Logically dead code")
> Fixes: 6cd225cc5d8a ("hwrng: exynos - add Samsung Exynos True RNG driver")
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  drivers/char/hw_random/exynos-trng.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks for the patch! Dan already fixed this few days before:

Best regards,

More information about the linux-arm-kernel mailing list