Skip to content

Commit

Permalink
crypto: ansi_cprng - Fix test in get_prng_bytes
Browse files Browse the repository at this point in the history
size_t nbytes cannot be less than 0 and the test was redundant.

Signed-off-by: Roel Kluin <[email protected]>
Acked-by: Neil Horman <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
RoelKluin authored and herbertx committed Oct 27, 2009
1 parent 8ffd1be commit 2024e7d
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions crypto/ansi_cprng.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2024e7d

Please sign in to comment.