提交 2024e7d6 编写于 作者: R Roel Kluin 提交者: Herbert Xu

crypto: ansi_cprng - Fix test in get_prng_bytes

size_t nbytes cannot be less than 0 and the test was redundant.
Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
Acked-by: NNeil Horman <nhorman@tuxdriver.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 8ffd1be6
......@@ -193,9 +193,6 @@ static int get_prng_bytes(char *buf, size_t nbytes, struct prng_context *ctx,
int err;
if (nbytes < 0)
return -EINVAL;
spin_lock_bh(&ctx->prng_lock);
err = -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册