summaryrefslogtreecommitdiffstats
path: root/drivers/char/hw_random/meson-rng.c
diff options
context:
space:
mode:
authorPrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>2016-08-26 20:32:04 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2016-08-31 17:00:49 +0200
commit68734bc9f58ee01f1b530394cc31d58e364125f6 (patch)
treef6ed179b8fa66ebd31e07e873d8b04c37416a7b5 /drivers/char/hw_random/meson-rng.c
parentcrypto: xor - Fix warning when XOR_SELECT_TEMPLATE is unset (diff)
downloadlinux-68734bc9f58ee01f1b530394cc31d58e364125f6.tar.xz
linux-68734bc9f58ee01f1b530394cc31d58e364125f6.zip
hwrng: Remove check for max less than 4 bytes
HW RNG core never asks for data less than 4 bytes. The check whether max is less than 4 bytes is unnecessary. Remove the check. 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/meson-rng.c')
-rw-r--r--drivers/char/hw_random/meson-rng.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/char/hw_random/meson-rng.c b/drivers/char/hw_random/meson-rng.c
index 0cfd81bcaeac..58bef39f7286 100644
--- a/drivers/char/hw_random/meson-rng.c
+++ b/drivers/char/hw_random/meson-rng.c
@@ -76,9 +76,6 @@ static int meson_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
struct meson_rng_data *data =
container_of(rng, struct meson_rng_data, rng);
- if (max < sizeof(u32))
- return 0;
-
*(u32 *)buf = readl_relaxed(data->base + RNG_DATA);
return sizeof(u32);