projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ffd1be
)
crypto: ansi_cprng - Fix test in get_prng_bytes
author
Roel Kluin
<roel.kluin@gmail.com>
Tue, 27 Oct 2009 10:51:33 +0000
(18:51 +0800)
committer
Herbert Xu
<herbert@gondor.apana.org.au>
Tue, 27 Oct 2009 10:51:33 +0000
(18:51 +0800)
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>
crypto/ansi_cprng.c
patch
|
blob
|
history
diff --git
a/crypto/ansi_cprng.c
b/crypto/ansi_cprng.c
index 027176a0e889bfaa30075854648b05eda71e9b83..45bd2182cb3660b02a1ecda77d42d42288bb78f9 100644
(file)
--- 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;