[PATCH 16/19] rtc: rx8010: use guard
From: alexandre . belloni
Date: Mon Oct 19 2026 - 17:21:33 EST
From: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
Use guard() to simplify error handling
Signed-off-by: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
---
drivers/rtc/rtc-rx8010.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/rtc/rtc-rx8010.c b/drivers/rtc/rtc-rx8010.c
index ce3954132336..0a9be6ea62d0 100644
--- a/drivers/rtc/rtc-rx8010.c
+++ b/drivers/rtc/rtc-rx8010.c
@@ -73,11 +73,10 @@ static irqreturn_t rx8010_irq_1_handler(int irq, void *dev_id)
struct rx8010_data *rx8010 = i2c_get_clientdata(client);
int flagreg, err;
- rtc_lock(rx8010->rtc);
+ guard(rtc_ops)(rx8010->rtc);
err = regmap_read(rx8010->regs, RX8010_FLAG, &flagreg);
if (err) {
- rtc_unlock(rx8010->rtc);
return IRQ_NONE;
}
@@ -100,7 +99,6 @@ static irqreturn_t rx8010_irq_1_handler(int irq, void *dev_id)
}
err = regmap_write(rx8010->regs, RX8010_FLAG, flagreg);
- rtc_unlock(rx8010->rtc);
return err ? IRQ_NONE : IRQ_HANDLED;
}
--
2.56.0