From 2024e7d6804b3f6251b28126eceb7f6bf2e3a4e8 Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Tue, 27 Oct 2009 18:51:33 +0800 Subject: 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 Acked-by: Neil Horman Signed-off-by: Herbert Xu --- crypto/ansi_cprng.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'crypto/ansi_cprng.c') diff --git a/crypto/ansi_cprng.c b/crypto/ansi_cprng.c index 027176a0e88..45bd2182cb3 100644 --- a/crypto/ansi_cprng.c +++ b/crypto/ansi_cprng.c @@ -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; -- cgit v1.2.3