lightnvm: add check after mempool allocation
authorJavier Gonzalez <javier@javigon.com>
Tue, 12 Jan 2016 06:49:17 +0000 (07:49 +0100)
committerJens Axboe <axboe@fb.com>
Tue, 12 Jan 2016 15:21:16 +0000 (08:21 -0700)
commit3bfbc6adbc5031e8a5907baa5beb27b41637742a
treed42026273ff620c22cd85e18e07069f05578c4a7
parentbdded1552085b12d23c9be76147d2e96647a098f
lightnvm: add check after mempool allocation

The mempool allocation might fail. Make sure to return error when it
does, instead of causing a kernel panic.

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