Commit fd794956 authored by Tejun Heo's avatar Tejun Heo Committed by Jens Axboe

block: fix return value on cfq_init() failure

cfq_init() would return zero after kmem cache creation failure.  Fix
so that it returns -ENOMEM.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 87c9ea76
......@@ -4202,6 +4202,7 @@ static int __init cfq_init(void)
if (ret)
return ret;
ret = -ENOMEM;
cfq_pool = KMEM_CACHE(cfq_queue, 0);
if (!cfq_pool)
goto err_pol_unreg;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment