arch/arm: correct the sched_lock/spin_lock handling

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an 2022-02-03 15:29:14 +08:00 committed by Alan Carvalho de Assis
parent 56b5ae0640
commit ed4f852073
4 changed files with 5 additions and 0 deletions

View File

@ -538,6 +538,7 @@ int imxrt_hprtc_setalarm(FAR struct timespec *ts, hprtc_alarm_callback_t cb)
if ((uint32_t)ts->tv_sec <= now)
{
rtcwarn("WARNING: time is in the past\n");
spin_unlock_irqrestore(NULL, flags);
return -EINVAL;
}

View File

@ -2261,6 +2261,7 @@ static int sam_sendsetup(FAR struct sdio_dev_s *dev,
lcderr("ERROR: sr %08" PRIx32 "\n", sr);
leave_critical_section(flags);
sched_unlock();
return -EIO;
}
else if ((sr & HSMCI_INT_TXRDY) != 0)

View File

@ -2249,6 +2249,7 @@ static int sam_sendsetup(FAR struct sdio_dev_s *dev,
mcerr("ERROR: sr %08" PRIx32 "\n", sr);
leave_critical_section(flags);
sched_unlock();
return -EIO;
}
else if ((sr & HSMCI_INT_TXRDY) != 0)

View File

@ -237,6 +237,8 @@ static CXD56_AUDIO_ECODE exec_dma_ch_sync_workaround(
if (timeout_cnt == DMA_TIMEOUT_CNT)
{
sched_unlock();
up_irq_enable();
return CXD56_AUDIO_ECODE_DMA_SMP_TIMEOUT;
}