summaryrefslogtreecommitdiffstats
path: root/drivers/char/hw_random/pic32-rng.c
diff options
context:
space:
mode:
authorPrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>2016-11-18 18:30:10 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2016-11-21 15:50:45 +0100
commited424bb3680b6e6167a44c5c195ec8f9aea3ab3b (patch)
tree11b446c82310aad649ff7888d479dbbdc5cd2a63 /drivers/char/hw_random/pic32-rng.c
parentcrypto: drbg - advance output buffer pointer (diff)
downloadlinux-ed424bb3680b6e6167a44c5c195ec8f9aea3ab3b.tar.xz
linux-ed424bb3680b6e6167a44c5c195ec8f9aea3ab3b.zip
hwrng: Make explicit that max >= 32 always
As hw_random core calls ->read with max > 32 or more, make it explicit. Also remove checks involving 'max' being less than 8. Signed-off-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char/hw_random/pic32-rng.c')
-rw-r--r--drivers/char/hw_random/pic32-rng.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/char/hw_random/pic32-rng.c b/drivers/char/hw_random/pic32-rng.c
index 11dc9b7c09ce..9b5e68a71d01 100644
--- a/drivers/char/hw_random/pic32-rng.c
+++ b/drivers/char/hw_random/pic32-rng.c
@@ -62,9 +62,6 @@ static int pic32_rng_read(struct hwrng *rng, void *buf, size_t max,
u32 t;
unsigned int timeout = RNG_TIMEOUT;
- if (max < 8)
- return 0;
-
do {
t = readl(priv->base + RNGRCNT) & RCNT_MASK;
if (t == 64) {