diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 37fe595cfd700c24e07cc477f3eb7bdf48bb1a21..295e98c2c8ccdf7c86515306157d620c83052119 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -1079,10 +1079,8 @@ int blkcg_init_queue(struct request_queue *q) if (preloaded) radix_tree_preload_end(); - if (IS_ERR(blkg)) { - blkg_free(new_blkg); + if (IS_ERR(blkg)) return PTR_ERR(blkg); - } q->root_blkg = blkg; q->root_rl.blkg = blkg;