Skip to contentSkip to conversation

rtc: k3: handle errors while enabling wake irq

PATCH Applied Dhruva Gole 2 participants 2 messages Mar 23, 2023 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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]>

---

Changelog:
Address the comments from Alexandre Belloni

V1 link:
https://lore.kernel.org/linux-rtc/[email protected]

 drivers/rtc/rtc-ti-k3.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/rtc/rtc-ti-k3.c +2 -1
index ba23163cc042..0d90fe923355 100644
@@ -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;
 }
 
Signature · 1 line
2.25.1
maintainer Applied
#1 lore raw
Quoted 4 lines · Dhruva Gole

Due to the potential failure of enable_irq_wake(), it would be better to return error if it fails.

Applied, thanks!

[1/1] rtc: k3: handle errors while enabling wake irq

      commit: d31d7300ebc0c43021ec48c0e6a3a427386f4617

Best regards,

Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com