Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2024e7d6 authored by Roel Kluin's avatar Roel Kluin Committed by Herbert Xu
Browse files

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: default avatarRoel Kluin <roel.kluin@gmail.com>
Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 8ffd1be6
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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;