arch/arm: correct the sched_lock/spin_lock handling
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
parent
56b5ae0640
commit
ed4f852073
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user