Commit a350259d authored by Stefan Agner's avatar Stefan Agner Committed by Alexandre Belloni

rtc: snvs: return error in case enable_irq_wake fails

If enable_irq_wake fails, we should return that error code so that
entering suspend fails. Otherwise we will get a WARNING along with
the hint of a unbalanced wake disable:
Unbalanced IRQ 37 wake disable
Signed-off-by: default avatarStefan Agner <stefan@agner.ch>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent b62c3a11
...@@ -322,7 +322,7 @@ static int snvs_rtc_suspend(struct device *dev) ...@@ -322,7 +322,7 @@ static int snvs_rtc_suspend(struct device *dev)
struct snvs_rtc_data *data = dev_get_drvdata(dev); struct snvs_rtc_data *data = dev_get_drvdata(dev);
if (device_may_wakeup(dev)) if (device_may_wakeup(dev))
enable_irq_wake(data->irq); return enable_irq_wake(data->irq);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment