linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] rtc: k3: handle errors while enabling wake irq
@ 2023-03-23  8:59 Dhruva Gole
  2023-03-23  9:51 ` Alexandre Belloni
  0 siblings, 1 reply; 2+ messages in thread
From: Dhruva Gole @ 2023-03-23  8:59 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Vibhore Vardhan, Dhruva Gole, linux-rtc, Alessandro Zummo,
	linux-kernel, Nishanth Menon

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 <nm@ti.com>
Signed-off-by: Dhruva Gole <d-gole@ti.com>
---

Changelog:
Address the comments from Alexandre Belloni

V1 link:
https://lore.kernel.org/linux-rtc/20230323081942.951542-1-d-gole@ti.com

 drivers/rtc/rtc-ti-k3.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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;
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH V2] rtc: k3: handle errors while enabling wake irq
  2023-03-23  8:59 [PATCH V2] rtc: k3: handle errors while enabling wake irq Dhruva Gole
@ 2023-03-23  9:51 ` Alexandre Belloni
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2023-03-23  9:51 UTC (permalink / raw)
  To: Dhruva Gole
  Cc: Vibhore Vardhan, linux-rtc, Alessandro Zummo, linux-kernel,
	Nishanth Menon


On Thu, 23 Mar 2023 14:29:04 +0530, Dhruva Gole wrote:
> 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,

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-23  9:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23  8:59 [PATCH V2] rtc: k3: handle errors while enabling wake irq Dhruva Gole
2023-03-23  9:51 ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).