aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDhruva Gole <[email protected]>2023-03-23 14:29:04 +0530
committerAlexandre Belloni <[email protected]>2023-03-23 10:50:59 +0100
commitd31d7300ebc0c43021ec48c0e6a3a427386f4617 (patch)
treeb671c4a99640227814e97fd7318fd24d4d051ea1
parent0e6255fa3f649170da6bd1a544680589cfae1131 (diff)
rtc: k3: handle errors while enabling wake irq
Due to the potential failure of enable_irq_wake(), it would be better to return error if it fails. Fixes: b09d633575e5 ("rtc: Introduce ti-k3-rtc") Cc: Nishanth Menon <[email protected]> Signed-off-by: Dhruva Gole <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
-rw-r--r--drivers/rtc/rtc-ti-k3.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-ti-k3.c b/drivers/rtc/rtc-ti-k3.c
index ba23163cc042..0d90fe923355 100644
--- a/drivers/rtc/rtc-ti-k3.c
+++ b/drivers/rtc/rtc-ti-k3.c
@@ -632,7 +632,8 @@ static int __maybe_unused ti_k3_rtc_suspend(struct device *dev)
struct ti_k3_rtc *priv = dev_get_drvdata(dev);
if (device_may_wakeup(dev))
- enable_irq_wake(priv->irq);
+ return enable_irq_wake(priv->irq);
+
return 0;
}