commit | 29615d03ccc0f8f01b45178737600810d8bf971f | [log] [tgz] |
---|---|---|
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | Mon Jun 04 14:05:40 2018 +0200 |
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | Mon Jun 04 14:36:14 2018 +0200 |
tree | 5eeb0fd992473e03dc6a711c8b8e1bf30a9d543c | |
parent | 696fa1d043ecd605166cc97b24c0b7a59dd5a135 [diff] |
rtc: sunxi: 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 before requesting the IRQ. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>