mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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: Roel Kluin <roel.kluin@gmail.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
8ffd1be677
commit
2024e7d680
1 changed files with 0 additions and 3 deletions
|
@ -193,9 +193,6 @@ static int get_prng_bytes(char *buf, size_t nbytes, struct prng_context *ctx,
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
|
||||||
if (nbytes < 0)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
spin_lock_bh(&ctx->prng_lock);
|
spin_lock_bh(&ctx->prng_lock);
|
||||||
|
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
|
|
Loading…
Reference in a new issue