Re: [PATCH 04/11] block: Return error code of elevator init function

From: Jeff Moyer
Date: Tue Oct 01 2013 - 08:25:38 EST


Andi Kleen <andi@xxxxxxxxxxxxxx> writes:

> From: Andi Kleen <ak@xxxxxxxxxxxxxxx>
>
> The error code was ignored, which I assume is a mistake.

Yeah, introduced in d50235b7bc3ee0a0427984d763ea7534149531b4, so I cc'd
Jianpeng Ma, though it looks pretty obvious.

Reviewed-by: Jeff Moyer <jmoyer@xxxxxxxxxx>

> Cc: axboe@xxxxxxxxx
> Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
> ---
> block/elevator.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/block/elevator.c b/block/elevator.c
> index 2bcbd8c..6c2a8ee 100644
> --- a/block/elevator.c
> +++ b/block/elevator.c
> @@ -184,7 +184,6 @@ static void elevator_release(struct kobject *kobj)
> int elevator_init(struct request_queue *q, char *name)
> {
> struct elevator_type *e = NULL;
> - int err;
>
> if (unlikely(q->elevator))
> return 0;
> @@ -222,8 +221,7 @@ int elevator_init(struct request_queue *q, char *name)
> }
> }
>
> - err = e->ops.elevator_init_fn(q, e);
> - return 0;
> + return e->ops.elevator_init_fn(q, e);
> }
> EXPORT_SYMBOL(elevator_init);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/