aboutsummaryrefslogtreecommitdiffstats
path: root/block/elevator.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/elevator.c')
-rw-r--r--block/elevator.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/block/elevator.c b/block/elevator.c
index 24c28b659bb3..afa3b037a17c 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -229,7 +229,9 @@ int elevator_init(struct request_queue *q, char *name)
229 } 229 }
230 230
231 err = e->ops.elevator_init_fn(q, e); 231 err = e->ops.elevator_init_fn(q, e);
232 return 0; 232 if (err)
233 elevator_put(e);
234 return err;
233} 235}
234EXPORT_SYMBOL(elevator_init); 236EXPORT_SYMBOL(elevator_init);
235 237