commit | 5490a1e018a4b447c1fdb49ec274a620e60a4d42 | [log] [tgz] |
---|---|---|
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | Sat May 19 10:01:42 2018 +0200 |
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | Sat May 19 10:47:46 2018 +0200 |
tree | ca7326fd9063e781d6ce2fcab27f004201894ca7 | |
parent | d7599245007a653fb5ff96d5ae067cb3204ff7fb [diff] |
rtc: mxc_v2: 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>