commit | a652e00ee1233e251a337c28e18a1da59224e5ce | [log] [tgz] |
---|---|---|
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | Wed Mar 20 13:32:27 2019 +0100 |
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | Thu Apr 04 10:07:08 2019 +0200 |
tree | 5d4a8cc07bf9a3e52519cca3d1d4fb23c2c4b708 | |
parent | 540a11d8bd00a89222220efcaa2f33fcbc68404f [diff] |
rtc: xgene: 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>