From 0d1e6c4a0ccd917a2b42dc75dfc20a22f23ab042 Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Mon, 19 Oct 2026 23:18:08 +0200 Subject: [PATCH] rtc: ds1343: use guard Use guard() to simplify error handling Link: https://patch.msgid.link/20261019211827.126262-7-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ds1343.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-ds1343.c b/drivers/rtc/rtc-ds1343.c index 54f6af7886a8..22abec4ba656 100644 --- a/drivers/rtc/rtc-ds1343.c +++ b/drivers/rtc/rtc-ds1343.c @@ -312,11 +312,11 @@ static irqreturn_t ds1343_thread(int irq, void *dev_id) unsigned int stat; int res = 0; - rtc_lock(priv->rtc); + guard(rtc_ops)(priv->rtc); res = regmap_read(priv->map, DS1343_STATUS_REG, &stat); if (res) - goto out; + return IRQ_HANDLED; if (stat & DS1343_IRQF0) { stat &= ~DS1343_IRQF0; @@ -328,8 +328,6 @@ static irqreturn_t ds1343_thread(int irq, void *dev_id) DS1343_A0IE, 0); } -out: - rtc_unlock(priv->rtc); return IRQ_HANDLED; }