diff --git a/drivers/timers/rtc.c b/drivers/timers/rtc.c index 5fe50dec39..21db78a246 100644 --- a/drivers/timers/rtc.c +++ b/drivers/timers/rtc.c @@ -185,15 +185,15 @@ static void rtc_alarm_callback(FAR void *priv, int alarmid) if (alarminfo->active) { + /* The alarm is no longer active */ + + alarminfo->active = false; + /* Yes.. signal the alarm expiration */ nxsig_notification(alarminfo->pid, &alarminfo->event, SI_QUEUE, &alarminfo->work); } - - /* The alarm is no longer active */ - - alarminfo->active = false; } #endif