aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/elevator.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/block/elevator.c b/block/elevator.c
index 23cfbe528be1..e58928e809ea 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -155,9 +155,10 @@ static void elevator_setup_default(void)
155 /* 155 /*
156 * If the given scheduler is not available, fall back to no-op. 156 * If the given scheduler is not available, fall back to no-op.
157 */ 157 */
158 if (!(e = elevator_find(chosen_elevator))) 158 if ((e = elevator_find(chosen_elevator)))
159 elevator_put(e);
160 else
159 strcpy(chosen_elevator, "noop"); 161 strcpy(chosen_elevator, "noop");
160 elevator_put(e);
161} 162}
162 163
163static int __init elevator_setup(char *str) 164static int __init elevator_setup(char *str)