/* Don't set an alarm in the past. */Oops, i'm a idiot, forgot to use '<='... will resend it.
if ((u32)alarm_time < current_time)
- alarm_offset = EC_RTC_ALARM_CLEAR;
- else
- alarm_offset = (u32)alarm_time - current_time;
+ return -ETIME;
+
+ alarm_offset = (u32)alarm_time - current_time;
}