Alexandre Belloni 9612f8f503 mfd: menelaus: Fix possible race condition and leak
The IRQ work is added 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 calling menelaus_add_irq_work.

Also, this solves a possible leak as the RTC is never released.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2018-09-11 16:40:21 +01:00
..
2016-11-29 08:21:33 +00:00
2018-08-20 15:38:44 -07:00
2018-06-11 07:20:17 -07:00
2018-07-04 07:17:13 +01:00
2018-01-08 11:03:35 +00:00
2018-06-12 16:19:22 -07:00
2017-07-18 08:27:18 +01:00
2016-08-10 09:25:18 +01:00
2016-08-10 09:25:18 +01:00
2017-04-27 09:25:04 +01:00
2017-11-29 16:29:36 +00:00
2015-08-11 15:09:01 +01:00
2015-09-04 11:46:02 -07:00