提交 c0133b00 编写于 作者: P PrasannaKumar Muralidharan 提交者: Herbert Xu

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: NPrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
Acked-By: NRick Altherr <raltherr@google.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 46d93748
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册