diff options
author | PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com> | 2017-08-22 18:22:24 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-09-22 11:43:14 +0200 |
commit | c0133b009ec28eee27966f6e3ed99bfdb3f17a21 (patch) | |
tree | f5127b1ba0047c57ad6041085ad830b1f8df4b47 /drivers/char | |
parent | crypto: aesni - Use GCM IV size constant (diff) | |
download | linux-c0133b009ec28eee27966f6e3ed99bfdb3f17a21.tar.xz linux-c0133b009ec28eee27966f6e3ed99bfdb3f17a21.zip |
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>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/hw_random/timeriomem-rng.c | 7 |
1 files changed, 0 insertions, 7 deletions
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 @@ -53,13 +53,6 @@ static int timeriomem_rng_read(struct hwrng *hwrng, void *data, 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 * bail out. Otherwise, wait for the completion. If the new data has |