Alexandre Belloni 9cf4789e6e rtc: 88pm860x: fix possible race condition
The RTC IRQ is requested before the struct rtc_device is allocated,
this may lead to a NULL pointer dereference in the IRQ handler.

To fix this issue, allocating the rtc_device struct before requesting
the RTC IRQ using devm_rtc_allocate_device, and use rtc_register_device
to register the RTC device.

Also remove the unnecessary error message as the core already prints the
info.

Link: https://lore.kernel.org/r/20200311223956.51352-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2020-03-16 11:55:55 +01:00
..
2019-07-17 10:03:50 -07:00
2019-11-08 16:14:09 +01:00
2019-07-17 10:03:50 -07:00
2019-11-08 16:14:09 +01:00
2019-12-03 13:31:08 -08:00
2019-04-16 18:06:54 +02:00
2020-02-04 07:03:40 +00:00
2019-12-23 11:23:53 +01:00
2019-04-04 10:07:10 +02:00
2019-10-19 22:33:05 +02:00
2019-11-08 16:14:09 +01:00
2019-05-23 17:44:52 +02:00
2020-03-16 11:12:08 +01:00
2019-05-08 22:14:36 +02:00