lkml.org 
[lkml]   [2012]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 1/2] 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>
---
block/cfq-iosched.c | 1 +
1 file changed, 1 insertion(+)

--- a/block/cfq-iosched.c
+++ b/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;

\
 
 \ /
  Last update: 2012-06-04 07:23    [W:0.090 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site