Skip to content
Commit abfdff44 authored by Alexandre Belloni's avatar Alexandre Belloni
Browse files

rtc: ensure rtc_set_alarm fails when alarms are not supported



When using RTC_ALM_SET or RTC_WKALM_SET with rtc_wkalrm.enabled not set,
rtc_timer_enqueue() is not called and rtc_set_alarm() may succeed but the
subsequent RTC_AIE_ON ioctl will fail. RTC_ALM_READ would also fail in that
case.

Ensure rtc_set_alarm() fails when alarms are not supported to avoid letting
programs think the alarms are working for a particular RTC when they are
not.

Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 1928906d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment