commit | 060711f5274dfc2d76a5b2cd65abf6ccbf061e40 | [log] [tgz] |
---|---|---|
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | Tue Apr 30 11:32:09 2019 +0200 |
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | Wed May 08 22:13:37 2019 +0200 |
tree | 2ea6a0a993fd6bb7fe1ec2f2141994b652029b40 | |
parent | 86836d641d33a23c05078e152f834b949bac7565 [diff] |
rtc: digicolor: 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. Acked-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>