summaryrefslogtreecommitdiff
path: root/drivers/char/hw_random/st-rng.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/hw_random/st-rng.c')
-rw-r--r--drivers/char/hw_random/st-rng.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/char/hw_random/st-rng.c b/drivers/char/hw_random/st-rng.c
index 1d35363d23c5..7e8aa6b7b452 100644
--- a/drivers/char/hw_random/st-rng.c
+++ b/drivers/char/hw_random/st-rng.c
@@ -54,9 +54,6 @@ static int st_rng_read(struct hwrng *rng, void *data, size_t max, bool wait)
u32 status;
int i;
- if (max < sizeof(u16))
- return -EINVAL;
-
/* Wait until FIFO is full - max 4uS*/
for (i = 0; i < ST_RNG_FILL_FIFO_TIMEOUT; i++) {
status = readl_relaxed(ddata->base + ST_RNG_STATUS_REG);