From: Shaohua Li Date: Mon, 28 Aug 2017 20:49:31 +0000 (-0700) Subject: block/nullb: delete unnecessary memory free X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=060fd198a3e113047da456f15889579067e6b75f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Shaohua Li Signed-off-by: Jens Axboe --- diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index 647213525549..3b5cabe374d2 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c @@ -1909,7 +1909,6 @@ out_cleanup_queues: out_free_nullb: kfree(nullb); out: - null_free_dev(dev); return rv; }