lightnvm: fix cleanup order of disk on init error
authorJavier González <jg@lightnvm.io>
Sat, 15 Apr 2017 18:55:43 +0000 (20:55 +0200)
committerJens Axboe <axboe@fb.com>
Sun, 16 Apr 2017 16:06:25 +0000 (10:06 -0600)
commit7d1ef2f408abecc05f9dfaec1095098a090879dc
treef27c6b044f8c1abe71be1a19ffe817b9080e3f24
parentedee1bdd66bf0fda46a176bc3ee5c992dbbc466e
lightnvm: fix cleanup order of disk on init error

Reorder disk allocation such that the disk structure can be put
safely.

Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <matias@cnexlabs.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/lightnvm/core.c