commit | fd7949564ced88385ca7758a4c1f47c274233dd5 | [log] [tgz] |
---|---|---|
author | Tejun Heo <tj@kernel.org> | Mon Jun 04 10:01:38 2012 +0200 |
committer | Jens Axboe <axboe@kernel.dk> | Mon Jun 04 10:01:38 2012 +0200 |
tree | b2f5ec960e17c604148f17239824c366954d8135 | |
parent | 87c9ea76a242c2f9063e2a8f3e90846c932c61a7 [diff] |
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>
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 673c977..ae5113d 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c
@@ -4202,6 +4202,7 @@ if (ret) return ret; + ret = -ENOMEM; cfq_pool = KMEM_CACHE(cfq_queue, 0); if (!cfq_pool) goto err_pol_unreg;