rtc: pl031: fix rtc features null pointer dereference
When there is no interrupt line, rtc alarm feature is disabled. The clearing of the alarm feature bit was being done prior to allocations of ldata->rtc device, resulting in a null pointer dereference. Clear RTC_FEATURE_ALARM after the rtc device is allocated. Fixes: d9b0dd54 ("rtc: pl031: use RTC_FEATURE_ALARM") Cc: stable@vger.kernel.org Signed-off-by: NAli Pouladi <quic_apouladi@quicinc.com> Signed-off-by: NElliot Berman <quic_eberman@quicinc.com> Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220225161924.274141-1-quic_eberman@quicinc.com
Showing
想要评论请 注册 或 登录