lightnvm: free memory when gennvm register fails
authorWenwei Tao <ww.tao0320@gmail.com>
Sat, 28 Nov 2015 15:49:23 +0000 (16:49 +0100)
committerJens Axboe <axboe@fb.com>
Sun, 29 Nov 2015 21:34:57 +0000 (14:34 -0700)
commit8261bd48c6c9c36cd2c2e343a69e76a3be2b04a4
treebc7135d65b0093ac658f0396f8391b95282d7919
parentc4699e70d1db14119708dae76dac7c43e1e12988
lightnvm: free memory when gennvm register fails

free allocated nvm block and gennvm lun structures when
gennvm register fails, otherwise it will cause memory leak.

Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/lightnvm/gennvm.c