From c0133b009ec28eee27966f6e3ed99bfdb3f17a21 Mon Sep 17 00:00:00 2001 From: PrasannaKumar Muralidharan Date: Tue, 22 Aug 2017 21:52:24 +0530 Subject: hwrng: timeriomem - Remove 'max < 4' condition check In read routiene max is always >= 4. The check whether 'max < 4' is not necessary. Remove it. Signed-off-by: PrasannaKumar Muralidharan Acked-By: Rick Altherr Signed-off-by: Herbert Xu --- drivers/char/hw_random/timeriomem-rng.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'drivers/char/hw_random') diff --git a/drivers/char/hw_random/timeriomem-rng.c b/drivers/char/hw_random/timeriomem-rng.c index 03ff5483d865..f615684028af 100644 --- a/drivers/char/hw_random/timeriomem-rng.c +++ b/drivers/char/hw_random/timeriomem-rng.c @@ -52,13 +52,6 @@ static int timeriomem_rng_read(struct hwrng *hwrng, void *data, int retval = 0; int period_us = ktime_to_us(priv->period); - /* - * The RNG provides 32-bits per read. Ensure there is enough space for - * at minimum one read. - */ - if (max < sizeof(u32)) - return 0; - /* * There may not have been enough time for new data to be generated * since the last request. If the caller doesn't want to wait, let them -- cgit v1.2.3