]> www.infradead.org Git - users/dwmw2/linux.git/commit
rtc: pm8xxx: fix possible race condition
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 3 Mar 2025 22:35:57 +0000 (23:35 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 17 Mar 2025 10:51:49 +0000 (11:51 +0100)
commit252f49cd71ba9d66089b447a18be792ea272a57e
tree0a89c5465946489b992fdfe4191ba51e18c0510a
parentde404fc19628352e507290f0a192ca1f537b4150
rtc: pm8xxx: fix possible race condition

probe must not fail after devm_rtc_register_device is successful because
the character device will be seen by userspace and may be opened right
away. Call it last to avoid opening the race window.

Link: https://lore.kernel.org/r/20250303223600.1135142-2-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-pm8xxx.c