Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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>
  • Loading branch information...
commit fd7949564ced88385ca7758a4c1f47c274233dd5 1 parent 87c9ea7
Tejun Heo authored axboe committed
Showing with 1 addition and 0 deletions.
  1. +1 −0  block/cfq-iosched.c
View
1  block/cfq-iosched.c
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.