commit | ebc2ec4ecf1893b9afaecc59fbd04b2bdf34f7c2 | [log] [tgz] |
---|---|---|
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | Tue Apr 16 10:30:43 2019 +0200 |
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | Mon Apr 29 15:53:42 2019 +0200 |
tree | 128a206c66821335fe30f285d5a97b0cdc6b47a2 | |
parent | cf612c5949aca2bd81a1e28688957c8149ea2693 [diff] |
rtc: mxc: fix possible race condition The IRQ is requested before the struct rtc is allocated and registered, but this struct is used in the IRQ handler. This may lead to a NULL pointer dereference. Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc struct before requesting the IRQ. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>