From 2fdd82bd8852ec8ebad5c69c45138da25c6f9273 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Wed, 12 Dec 2007 18:51:56 +0100 Subject: block: let elv_register() return void elv_register() always returns 0, and there isn't anything it does where it should return an error (the only error condition is so grave that it's handled with a BUG_ON). Signed-off-by: Adrian Bunk Signed-off-by: Jens Axboe --- block/cfq-iosched.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'block/cfq-iosched.c') diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 0b4a4790557..13553e015d7 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -2279,8 +2279,6 @@ static struct elevator_type iosched_cfq = { static int __init cfq_init(void) { - int ret; - /* * could be 0 on HZ < 1000 setups */ @@ -2292,11 +2290,9 @@ static int __init cfq_init(void) if (cfq_slab_setup()) return -ENOMEM; - ret = elv_register(&iosched_cfq); - if (ret) - cfq_slab_kill(); + elv_register(&iosched_cfq); - return ret; + return 0; } static void __exit cfq_exit(void) -- cgit v1.2.3