[PATCH 3/5] rtc: 88pm80x: fix possible race condition

2018-05-17 Thread Alexandre Belloni
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

[PATCH 3/5] rtc: 88pm80x: fix possible race condition

2018-05-17 Thread Alexandre Belloni
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