hwrng: core - Fix double unlock in rng_dev_read
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 23 Dec 2009 15:22:34 +0000 (23:22 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 23 Dec 2009 15:22:34 +0000 (23:22 +0800)
commitf5908267b67917b8cbd98b27fd2be9b5f62ec76f
treedd3dcc47efa84d218c537dc47ea414b543abaf1c
parent55639353a0035052d9ea6cfe4dde0ac7fcbb2c9f
hwrng: core - Fix double unlock in rng_dev_read

When the loop terminates with size == 0 in rng_dev_read we will
unlock the rng mutex twice.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/core.c