projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bbb4383
)
rtc: coh901331: fix a missing check of clk_prepare
author
Kangjie Lu
<
[email protected]
>
Wed, 26 Dec 2018 02:43:33 +0000
(20:43 -0600)
committer
Alexandre Belloni
<
[email protected]
>
Tue, 22 Jan 2019 18:01:19 +0000
(19:01 +0100)
clk_prepare() could fail, so let's check its status and if it fails
return its error code upstream.
Signed-off-by: Kangjie Lu <
[email protected]
>
Acked-by: Linus Walleij <
[email protected]
>
Signed-off-by: Alexandre Belloni <
[email protected]
>
drivers/rtc/rtc-coh901331.c
patch
|
blob
|
history
diff --git
a/drivers/rtc/rtc-coh901331.c
b/drivers/rtc/rtc-coh901331.c
index fc5cf5c44ae76e8349e6b955f7e823a5bb6b3694..0b232c84f674d950f456fc3810799697fd6d615e 100644
(file)
--- 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 {