Searched hist:f2997775b111c6d660c32a18d5d44d37cb7361b1 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/rtc/ |
H A D | rtc-sa1100.c | diff f2997775b111c6d660c32a18d5d44d37cb7361b1 Thu Mar 05 19:01:44 CST 2020 Alexandre Belloni <alexandre.belloni@bootlin.com> rtc: sa1100: fix possible race condition
Both RTC IRQs are requested before the struct rtc_device is allocated, this may lead to a NULL pointer dereference in the IRQ handler.
To fix this issue, allocating the rtc_device struct before requesting the IRQs using devm_rtc_allocate_device, and use rtc_register_device to register the RTC device.
Link: https://lore.kernel.org/r/20200306010146.39762-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
|