Commit 6215ed4f authored by Ali Pouladi's avatar Ali Pouladi Committed by Todd Kjos
Browse files

FROMGIT: 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: default avatarAli Pouladi <quic_apouladi@quicinc.com>
Signed-off-by: default avatarElliot Berman <quic_eberman@quicinc.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20220225161924.274141-1-quic_eberman@quicinc.com
(cherry picked from commit 77b0eea1508d116b67753bdaf9378a2e30b815a9
 https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git


 rtc-next)

Bug: 223381022
Change-Id: Ie48a3ad9708466462331e07334de94f1cf6d4074
Signed-off-by: default avatarElliot Berman <quic_eberman@quicinc.com>
parent 097c689d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment