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 <prasannatsmkumar@gmail.com>
Acked-By: Rick Altherr <raltherr@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
PrasannaKumar Muralidharan 2017-08-22 21:52:24 +05:30 committed by Herbert Xu
parent 46d93748e5
commit c0133b009e
1 changed files with 0 additions and 7 deletions

View File

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