Skip to content

Commit

Permalink
[BLOCK] elevator init fixes analogdevicesinc#2
Browse files Browse the repository at this point in the history
In addition to the first patch, which is probably goodness, I found the
cause of my panic - applying this patch fixes it and now I am booting.
If the chosen_elevator[] is not found, fall back to noop.

Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Zachary Amsden authored and Jens Axboe committed Nov 12, 2005
1 parent b8ea2cb commit cff3ba2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,10 @@ static void elevator_setup_default(void)
/*
* If the given scheduler is not available, fall back to no-op.
*/
if (!(e = elevator_find(chosen_elevator)))
if ((e = elevator_find(chosen_elevator)))
elevator_put(e);
else
strcpy(chosen_elevator, "noop");
elevator_put(e);
}

static int __init elevator_setup(char *str)
Expand Down

0 comments on commit cff3ba2

Please sign in to comment.