summaryrefslogtreecommitdiffstats
path: root/drivers/char/toshiba.c
diff options
context:
space:
mode:
authorPrasannaKumar Muralidharan2016-09-07 16:48:02 +0200
committerHerbert Xu2016-09-13 14:27:22 +0200
commit58b022acac8dd435dad0b162ad92cbe8ec90a703 (patch)
tree09dd4e1bf5d30a103e9eaa905cae7b6fe3631291 /drivers/char/toshiba.c
parentcrypto: qat - fix leak on error path (diff)
downloadkernel-qcow2-linux-58b022acac8dd435dad0b162ad92cbe8ec90a703.tar.gz
kernel-qcow2-linux-58b022acac8dd435dad0b162ad92cbe8ec90a703.tar.xz
kernel-qcow2-linux-58b022acac8dd435dad0b162ad92cbe8ec90a703.zip
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>
Diffstat (limited to 'drivers/char/toshiba.c')
0 files changed, 0 insertions, 0 deletions