mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
rtc: asm9260: use guard
Use guard() to simplify error handling Link: https://patch.msgid.link/20261019211827.126262-3-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
f49ca91f8a
commit
217439c8fc
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user