Skip to content
Commit f2997775 authored by Alexandre Belloni's avatar Alexandre Belloni
Browse files

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: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 0a22bd6f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment