* [PATCH] rtc: fix a missing check of clk_prepare
@ 2018-12-26 2:43 Kangjie Lu
2018-12-27 9:43 ` Linus Walleij
2019-01-22 18:02 ` Alexandre Belloni
0 siblings, 2 replies; 3+ messages in thread
From: Kangjie Lu @ 2018-12-26 2:43 UTC (permalink / raw)
To: kjlu
Cc: pakki001, Linus Walleij, Alessandro Zummo, Alexandre Belloni,
linux-arm-kernel, linux-rtc, linux-kernel
clk_prepare() could fail, so let's check its status and if it fails
return its error code upstream.
Signed-off-by: Kangjie Lu <kjlu@umn.edu>
---
drivers/rtc/rtc-coh901331.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-coh901331.c b/drivers/rtc/rtc-coh901331.c
index fc5cf5c44ae7..0b232c84f674 100644
--- a/drivers/rtc/rtc-coh901331.c
+++ b/drivers/rtc/rtc-coh901331.c
@@ -235,9 +235,13 @@ static int coh901331_suspend(struct device *dev)
static int coh901331_resume(struct device *dev)
{
+ int ret;
struct coh901331_port *rtap = dev_get_drvdata(dev);
- clk_prepare(rtap->clk);
+ ret = clk_prepare(rtap->clk);
+ if (ret)
+ return ret;
+
if (device_may_wakeup(dev)) {
disable_irq_wake(rtap->irq);
} else {
--
2.17.2 (Apple Git-113)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] rtc: fix a missing check of clk_prepare
2018-12-26 2:43 [PATCH] rtc: fix a missing check of clk_prepare Kangjie Lu
@ 2018-12-27 9:43 ` Linus Walleij
2019-01-22 18:02 ` Alexandre Belloni
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2018-12-27 9:43 UTC (permalink / raw)
To: Kangjie Lu
Cc: pakki001, Alessandro Zummo, Alexandre Belloni, Linux ARM,
linux-rtc, linux-kernel
On Wed, Dec 26, 2018 at 3:44 AM Kangjie Lu <kjlu@umn.edu> wrote:
> clk_prepare() could fail, so let's check its status and if it fails
> return its error code upstream.
>
> Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] rtc: fix a missing check of clk_prepare
2018-12-26 2:43 [PATCH] rtc: fix a missing check of clk_prepare Kangjie Lu
2018-12-27 9:43 ` Linus Walleij
@ 2019-01-22 18:02 ` Alexandre Belloni
1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2019-01-22 18:02 UTC (permalink / raw)
To: Kangjie Lu
Cc: pakki001, Linus Walleij, Alessandro Zummo, linux-arm-kernel,
linux-rtc, linux-kernel
On 25/12/2018 20:43:33-0600, Kangjie Lu wrote:
> clk_prepare() could fail, so let's check its status and if it fails
> return its error code upstream.
>
> Signed-off-by: Kangjie Lu <kjlu@umn.edu>
> ---
> drivers/rtc/rtc-coh901331.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
Applied, thanks.
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-01-22 18:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-26 2:43 [PATCH] rtc: fix a missing check of clk_prepare Kangjie Lu
2018-12-27 9:43 ` Linus Walleij
2019-01-22 18:02 ` Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).