summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-sa1100.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>2017-08-21 19:00:38 +0300
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2017-08-24 12:03:35 +0300
commit1cf85b2327a9b03bde5266e72ee64a38d085256d (patch)
tree8cfb598b080292e5d713083d7c764afd76f113c4 /drivers/rtc/rtc-sa1100.c
parent56c0c529848c853bc1049e271975917e8c9f4389 (diff)
downloadlinux-1cf85b2327a9b03bde5266e72ee64a38d085256d.tar.xz
rtc: sa1100: fix unbalanced clk_prepare_enable/clk_disable_unprepare
In the error path of sa1100_rtc_open(), info->clk is disabled which will happen again in sa1100_rtc_remove() when the module is removed whereas it is only enabled once in sa1100_rtc_init(). Fixes: 0cc0c38e9139 ("drivers/rtc/rtc-sa1100.c: move clock enable/disable to probe/remove") Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc/rtc-sa1100.c')
-rw-r--r--drivers/rtc/rtc-sa1100.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c
index c2187bf6c7e4..fe8ebf47bbe5 100644
--- a/drivers/rtc/rtc-sa1100.c
+++ b/drivers/rtc/rtc-sa1100.c
@@ -104,7 +104,7 @@ static int sa1100_rtc_open(struct device *dev)
ret = request_irq(info->irq_1hz, sa1100_rtc_interrupt, 0, "rtc 1Hz", dev);
if (ret) {
dev_err(dev, "IRQ %d already in use.\n", info->irq_1hz);
- goto fail_ui;
+ return ret;
}
ret = request_irq(info->irq_alarm, sa1100_rtc_interrupt, 0, "rtc Alrm", dev);
if (ret) {
@@ -118,8 +118,6 @@ static int sa1100_rtc_open(struct device *dev)
fail_ai:
free_irq(info->irq_1hz, dev);
- fail_ui:
- clk_disable_unprepare(info->clk);
return ret;
}