summaryrefslogtreecommitdiff
path: root/block/elevator.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2014-11-26 20:37:57 +0000
committerMark Brown <broonie@kernel.org>2014-11-26 20:37:57 +0000
commitcf2394f70cf7774a107fbaa1ef5010db4bd69baa (patch)
treee79e3e479d04213a67ecd47b31c7db648b0313c2 /block/elevator.c
parent45fc84c668ba6cc08cbae74042be838bf9283d98 (diff)
parent206c5f60a3d902bc4b56dab2de3e88de5eb06108 (diff)
Merge tag 'v3.18-rc4' into regulator-max77802
Linux 3.18-rc4
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)
}
err = e->ops.elevator_init_fn(q, e);
- return 0;
+ if (err)
+ elevator_put(e);
+ return err;
}
EXPORT_SYMBOL(elevator_init);