rtc: pm8xxx: return IRQ_NONE on errors
authorJohan Hovold <johan+linaro@kernel.org>
Thu, 2 Feb 2023 15:54:31 +0000 (16:54 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 9 Feb 2023 22:17:56 +0000 (23:17 +0100)
In the unlikely event that disabling the alarm and clearing the status
ever fails, return IRQ_NONE instead of IRQ_HANDLED.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20230202155448.6715-6-johan+linaro@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-pm8xxx.c

index 053a04f74a91857c9fe950e2f621ac8276bee337..dc7e659cbb2aa04c764b90a447d3904b15144ff4 100644 (file)
@@ -291,14 +291,14 @@ static irqreturn_t pm8xxx_alarm_trigger(int irq, void *dev_id)
        rc = regmap_update_bits(rtc_dd->regmap, regs->alarm_ctrl,
                                regs->alarm_en, 0);
        if (rc)
-               goto out;
+               return IRQ_NONE;
 
        /* Clear RTC alarm register */
        rc = regmap_update_bits(rtc_dd->regmap, regs->alarm_ctrl2,
                                PM8xxx_RTC_ALARM_CLEAR, 0);
        if (rc)
-               goto out;
-out:
+               return IRQ_NONE;
+
        return IRQ_HANDLED;
 }