提交 fd794956 编写于 作者: T Tejun Heo 提交者: 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: NTejun Heo <tj@kernel.org>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册