]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rtc: st-lpc: Use IRQF_NO_AUTOEN flag in request_irq()
authorJinjie Ruan <ruanjinjie@huawei.com>
Thu, 12 Sep 2024 03:37:27 +0000 (11:37 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2024 13:03:03 +0000 (14:03 +0100)
commit251f142b519d9d8862bafab45a0749190801916f
treedff38e0ae4051a48c2bdf37518ce6ea2d93b736e
parentde5dac261eeab99762bbdf7c20cee5d26ef4462e
rtc: st-lpc: Use IRQF_NO_AUTOEN flag in request_irq()

[ Upstream commit b6cd7adec0cf03f0aefc55676e71dd721cbc71a8 ]

If request_irq() fails in st_rtc_probe(), there is no need to enable
the irq, and if it succeeds, disable_irq() after request_irq() still has
a time gap in which interrupts can come.

request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable when
request IRQ.

Fixes: b5b2bdfc2893 ("rtc: st: Add new driver for ST's LPC RTC")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20240912033727.3013951-1-ruanjinjie@huawei.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/rtc/rtc-st-lpc.c