arch: cxd56xx: Return error for RTC alarm setting before initialization
Return EBUSY error for alarm setting before completion of RTC initialization.
This commit is contained in:
parent
13f59128fd
commit
104dfb983d
@ -553,7 +553,7 @@ int cxd56_rtc_setalarm(struct alm_setalarm_s *alminfo)
|
||||
id = alminfo->as_id;
|
||||
cbinfo = &g_alarmcb[id];
|
||||
|
||||
if (cbinfo->ac_cb == NULL)
|
||||
if (g_rtc_enabled && (cbinfo->ac_cb == NULL))
|
||||
{
|
||||
/* The set the alarm */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user