block/nullb: delete unnecessary memory free
authorShaohua Li <shli@fb.com>
Mon, 28 Aug 2017 20:49:31 +0000 (13:49 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 28 Aug 2017 21:06:17 +0000 (15:06 -0600)
commit060fd198a3e113047da456f15889579067e6b75f
treed8f30e5d2a57291b8e62071cbbd0cc5df0c3aebd
parente9a823fb34a8b0fcba6e112aa1003258a1a5af50
block/nullb: delete unnecessary memory free

Commit 2984c86(nullb: factor disk parameters) has a typo. The
nullb_device allocation/free is done outside of null_add_dev. The commit
accidentally frees the nullb_device in error code path.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/null_blk.c