summaryrefslogtreecommitdiff
path: root/crypto/ansi_cprng.c
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-10-27 18:51:33 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2009-10-27 18:51:33 +0800
commit0739e06aaca5fe2c3389eb4123e5c6d183a6a322 (patch)
tree5038e66cb61e0e2bf630394d392b608e904400c3 /crypto/ansi_cprng.c
parent223df50d1596a0b48e23d279425d79f1bd870f65 (diff)
downloadlinux-crypto-0739e06aaca5fe2c3389eb4123e5c6d183a6a322.tar.gz
linux-crypto-0739e06aaca5fe2c3389eb4123e5c6d183a6a322.zip
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>
Diffstat (limited to '')
-rw-r--r--crypto/ansi_cprng.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/crypto/ansi_cprng.c b/crypto/ansi_cprng.c
index 027176a0..45bd2182 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;