diff options
-rw-r--r-- | block/elevator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/elevator.c b/block/elevator.c index d4a49a3df829..23cfbe528be1 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
@@ -190,14 +190,14 @@ int elevator_init(request_queue_t *q, char *name) | |||
190 | 190 | ||
191 | eq = kmalloc(sizeof(struct elevator_queue), GFP_KERNEL); | 191 | eq = kmalloc(sizeof(struct elevator_queue), GFP_KERNEL); |
192 | if (!eq) { | 192 | if (!eq) { |
193 | elevator_put(e->elevator_type); | 193 | elevator_put(e); |
194 | return -ENOMEM; | 194 | return -ENOMEM; |
195 | } | 195 | } |
196 | 196 | ||
197 | ret = elevator_attach(q, e, eq); | 197 | ret = elevator_attach(q, e, eq); |
198 | if (ret) { | 198 | if (ret) { |
199 | kfree(eq); | 199 | kfree(eq); |
200 | elevator_put(e->elevator_type); | 200 | elevator_put(e); |
201 | } | 201 | } |
202 | 202 | ||
203 | return ret; | 203 | return ret; |