mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
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: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
87c9ea76a2
commit
fd7949564c
1 changed files with 1 additions and 0 deletions
|
@ -4202,6 +4202,7 @@ static int __init cfq_init(void)
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
ret = -ENOMEM;
|
||||||
cfq_pool = KMEM_CACHE(cfq_queue, 0);
|
cfq_pool = KMEM_CACHE(cfq_queue, 0);
|
||||||
if (!cfq_pool)
|
if (!cfq_pool)
|
||||||
goto err_pol_unreg;
|
goto err_pol_unreg;
|
||||||
|
|
Loading…
Reference in a new issue