Alexandre Belloni 66bfacd0f3 rtc: 88pm860x: fix possible race condition
[ Upstream commit 9cf4789e6e4673d0b2c96fa6bb0c35e81b43111a ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-23 10:36:31 +02:00
..
2020-02-14 16:34:12 -05:00
2019-05-09 14:46:33 -07:00
2019-07-17 10:03:50 -07:00
2019-07-17 10:03:50 -07:00
2019-07-17 10:03:50 -07:00
2019-04-16 18:06:54 +02:00
2019-04-04 10:06:54 +02:00
2019-05-16 09:19:14 -07:00
2019-04-04 10:07:10 +02:00
2017-09-05 09:55:02 +02:00
2019-07-17 10:03:50 -07:00
2019-07-17 10:03:50 -07:00
2019-05-09 14:46:33 -07:00
2019-07-17 10:03:50 -07:00
2019-05-23 17:44:52 +02:00
2019-04-29 15:53:43 +02:00
2019-05-08 22:14:36 +02:00