From: weiping zhang Date: Fri, 18 Aug 2017 16:37:20 +0000 (+0800) Subject: block, bfq: fix error handle in bfq_init X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=37dcd6570f2e95364c26426d4110ba40c07df067;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git block, bfq: fix error handle in bfq_init if elv_register fail, bfq_pool should be free. Signed-off-by: weiping zhang Signed-off-by: Jens Axboe --- diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 509f39998011..ea2832b6698c 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -5062,10 +5062,12 @@ static int __init bfq_init(void) ret = elv_register(&iosched_bfq_mq); if (ret) - goto err_pol_unreg; + goto slab_kill; return 0; +slab_kill: + bfq_slab_kill(); err_pol_unreg: #ifdef CONFIG_BFQ_GROUP_IOSCHED blkcg_policy_unregister(&blkcg_policy_bfq);