[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lsq.1511315893.260707297@decadent.org.uk>
Date: Wed, 22 Nov 2017 01:58:13 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC: akpm@...ux-foundation.org,
"Alexandre Belloni" <alexandre.belloni@...e-electrons.com>,
"Robert Jarzmik" <robert.jarzmik@...e.fr>
Subject: [PATCH 3.16 050/133] rtc: sa1100: fix unbalanced clk_prepare_enable/clk_disable_unprepare
3.16.51-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Alexandre Belloni <alexandre.belloni@...e-electrons.com>
commit 1cf85b2327a9b03bde5266e72ee64a38d085256d upstream.
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@...e.fr>
Signed-off-by: Alexandre Belloni <alexandre.belloni@...e-electrons.com>
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
drivers/rtc/rtc-sa1100.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/drivers/rtc/rtc-sa1100.c
+++ b/drivers/rtc/rtc-sa1100.c
@@ -111,7 +111,7 @@ static int sa1100_rtc_open(struct device
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) {
@@ -125,8 +125,6 @@ static int sa1100_rtc_open(struct device
fail_ai:
free_irq(info->irq_1hz, dev);
- fail_ui:
- clk_disable_unprepare(info->clk);
return ret;
}
Powered by blists - more mailing lists