mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
rtc: coh901331: fix a missing check of clk_prepare
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]>
This commit is contained in:
committed by
Alexandre Belloni
parent
bbb4383826
commit
5910fa0d0d
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user