[PATCH 03/19] rtc: asm9260: use guard

From: alexandre . belloni

Date: Mon Oct 19 2026 - 17:19:04 EST


From: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>

Use guard() to simplify error handling

Signed-off-by: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
---
drivers/rtc/rtc-asm9260.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/rtc/rtc-asm9260.c b/drivers/rtc/rtc-asm9260.c
index 705470ae8428..422c2e5d83aa 100644
--- a/drivers/rtc/rtc-asm9260.c
+++ b/drivers/rtc/rtc-asm9260.c
@@ -116,15 +116,13 @@ static irqreturn_t asm9260_rtc_irq(int irq, void *dev_id)
u32 isr;
unsigned long events = 0;

- rtc_lock(priv->rtc);
+ guard(rtc_ops)(priv->rtc);
isr = ioread32(priv->iobase + HW_CIIR);
if (!isr) {
- rtc_unlock(priv->rtc);
return IRQ_NONE;
}

iowrite32(0, priv->iobase + HW_CIIR);
- rtc_unlock(priv->rtc);

events |= RTC_AF | RTC_IRQF;

--
2.56.0