null_blk: Cleanup error recovery in null_add_dev()
authorJan Kara <jack@suse.cz>
Wed, 22 Oct 2014 13:34:21 +0000 (15:34 +0200)
committerJens Axboe <axboe@fb.com>
Wed, 22 Oct 2014 13:59:25 +0000 (07:59 -0600)
When creation of queues fails in init_driver_queues(), we free the
queues. But null_add_dev() doesn't test for this failure and continues
with the setup leading to strange consequences, likely oops. Fix the
problem by testing whether init_driver_queues() failed and do proper
error cleanup.

Coverity-id: 1148005
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>

No differences found