Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

PrasannaKumar Muralidharan and committed by
Herbert Xu
c0133b00 46d93748

-7
-7
drivers/char/hw_random/timeriomem-rng.c
··· 53 53 int period_us = ktime_to_us(priv->period); 54 54 55 55 /* 56 - * The RNG provides 32-bits per read. Ensure there is enough space for 57 - * at minimum one read. 58 - */ 59 - if (max < sizeof(u32)) 60 - return 0; 61 - 62 - /* 63 56 * There may not have been enough time for new data to be generated 64 57 * since the last request. If the caller doesn't want to wait, let them 65 58 * bail out. Otherwise, wait for the completion. If the new data has