arch/renesas: fix leaving from critical section
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
parent
d59931159a
commit
8e004839b6
@ -843,6 +843,7 @@ static void m16c_rxint(struct up_dev_s *dev, bool enable)
|
||||
#endif
|
||||
{
|
||||
_err("ERROR: Invalid UART #\n");
|
||||
leave_critical_section(flags);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -975,6 +976,7 @@ static void m16c_txint(struct up_dev_s *dev, bool enable)
|
||||
#endif
|
||||
{
|
||||
_err("ERROR: Invalid UART #\n");
|
||||
leave_critical_section(flags);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1326,6 +1326,7 @@ dtc_err_t rx65n_dtc_setup_seq_dynamic_transferdata(DTC_HANDLE handle,
|
||||
ret = rx65n_dtc_validate_dynamic_params(p_dtransfer_cfg, p_transfer_data);
|
||||
if (DTC_SUCCESS != ret)
|
||||
{
|
||||
leave_critical_section(flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1345,6 +1346,7 @@ dtc_err_t rx65n_dtc_setup_seq_dynamic_transferdata(DTC_HANDLE handle,
|
||||
if (rx65n_dtc_set_dynamic_transfer_data(p_dtransfer_cfg,
|
||||
p_transfer_data) != DTC_SUCCESS)
|
||||
{
|
||||
leave_critical_section(flags);
|
||||
return DTC_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
@ -1536,6 +1538,7 @@ dtc_err_t rx65n_dtc_setup_dynamic_transferdata(DTC_HANDLE handle,
|
||||
ret = rx65n_dtc_validate_dynamic_params(p_dtransfer_cfg, p_transfer_data);
|
||||
if (DTC_SUCCESS != ret)
|
||||
{
|
||||
leave_critical_section(flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1546,6 +1549,7 @@ dtc_err_t rx65n_dtc_setup_dynamic_transferdata(DTC_HANDLE handle,
|
||||
if (rx65n_dtc_set_dynamic_transfer_data(p_dtransfer_cfg,
|
||||
p_transfer_data) != DTC_SUCCESS)
|
||||
{
|
||||
leave_critical_section(flags);
|
||||
return DTC_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
|
@ -2547,7 +2547,6 @@ FAR struct spi_dev_s *rx65n_rspibus_initialize(int bus)
|
||||
#endif
|
||||
{
|
||||
spierr("ERROR: Unsupported RSPI bus: %d\n", bus);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
leave_critical_section(flags);
|
||||
|
@ -2144,7 +2144,6 @@ FAR struct spi_dev_s *rx65n_rspibus_initialize(int bus)
|
||||
#endif
|
||||
{
|
||||
spierr("ERROR: Unsupported RSPI bus: %d\n", bus);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
leave_critical_section(flags);
|
||||
|
@ -912,7 +912,6 @@ int rx65n_rtc_setalarm(FAR struct alm_setalarm_s *alminfo)
|
||||
uint8_t dummy_byte;
|
||||
uint8_t dummy_word;
|
||||
uint8_t i;
|
||||
int ret = -EBUSY;
|
||||
|
||||
/* Is there already something waiting on the ALARM? */
|
||||
|
||||
@ -1068,11 +1067,10 @@ int rx65n_rtc_setalarm(FAR struct alm_setalarm_s *alminfo)
|
||||
/* Set Priority of ALM interrupt */
|
||||
|
||||
IPR(RTC, ALM) = _0F_RTC_PRIORITY_LEVEL15;
|
||||
ret = OK;
|
||||
leave_critical_section(flags);
|
||||
UNUSED(dummy_byte);
|
||||
UNUSED(dummy_word);
|
||||
return ret;
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1117,8 +1115,8 @@ int rx65n_rtc_setperiodic(FAR const struct timespec *period,
|
||||
/* Set PRD priority level */
|
||||
|
||||
IPR(RTC, PRD) = _0F_RTC_PRIORITY_LEVEL15;
|
||||
return OK;
|
||||
leave_critical_section(flags);
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -3138,6 +3138,7 @@ static int rx65n_epsubmit(FAR struct usbdev_ep_s *ep, FAR struct
|
||||
{
|
||||
privreq->req.len = CDC_CLASS_DATA_LENGTH;
|
||||
rx65n_rdrequest(epno, priv, privep);
|
||||
leave_critical_section(flags);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@ -3146,6 +3147,7 @@ static int rx65n_epsubmit(FAR struct usbdev_ep_s *ep, FAR struct
|
||||
if (!privep->txbusy)
|
||||
{
|
||||
ret = rx65n_wrrequest(epno, priv, privep);
|
||||
leave_critical_section(flags);
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
@ -3159,6 +3161,7 @@ static int rx65n_epsubmit(FAR struct usbdev_ep_s *ep, FAR struct
|
||||
if (priv->ep0state == EP0STATE_RDREQUEST)
|
||||
{
|
||||
rx65n_rdrequest(epno, priv, privep);
|
||||
leave_critical_section(flags);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user