projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46d9374
)
hwrng: timeriomem - Remove 'max < 4' condition check
author
PrasannaKumar Muralidharan
<
[email protected]
>
Tue, 22 Aug 2017 16:22:24 +0000
(21:52 +0530)
committer
Herbert Xu
<
[email protected]
>
Fri, 22 Sep 2017 09:43:14 +0000
(17:43 +0800)
In read routiene max is always >= 4. The check whether 'max < 4' is not
necessary. Remove it.
Signed-off-by: PrasannaKumar Muralidharan <
[email protected]
>
Acked-By: Rick Altherr <
[email protected]
>
Signed-off-by: Herbert Xu <
[email protected]
>
drivers/char/hw_random/timeriomem-rng.c
patch
|
blob
|
history
diff --git
a/drivers/char/hw_random/timeriomem-rng.c
b/drivers/char/hw_random/timeriomem-rng.c
index 03ff5483d8654b069d287a12139c1bf57cb12982..f615684028af710fc6a6db109c2f88282b4d6cf6 100644
(file)
--- 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