PrasannaKumar Muralidharan 58b022acac hwrng: core - Allocate memory during module init
In core rng_buffer and rng_fillbuf is allocated in hwrng_register only
once and it is freed during module exit. This patch moves allocating
rng_buffer and rng_fillbuf from hwrng_register to rng core's init. This
avoids checking whether rng_buffer and rng_fillbuf was allocated from
every hwrng_register call. Also moving them to module init makes it
explicit that it is freed in module exit.

Change in v2:
Fix memory leak when register_miscdev fails.

Signed-off-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2016-09-13 20:27:22 +08:00
..
2013-05-05 00:11:29 -04:00
2016-07-14 16:21:53 +09:00
2013-02-22 23:31:31 -05:00
2016-02-17 09:39:56 +01:00
2016-08-05 09:48:22 -04:00
2013-12-18 16:39:54 -08:00
2016-08-05 09:48:22 -04:00
2016-07-26 16:19:19 -07:00
2013-02-22 23:31:31 -05:00
2016-01-22 18:04:28 -05:00
2015-03-25 20:28:11 -04:00
2013-10-16 12:36:10 -07:00