Fix several places in DMA logic where a spurious semicolon causes bad conditional logic
This commit is contained in:
parent
f64f7407ba
commit
c00e3e55dc
|
@ -516,7 +516,8 @@ static int stm32_tim_setmode(FAR struct stm32_tim_dev_s *dev, stm32_tim_mode_t m
|
|||
val |= ATIM_CR1_OPM;
|
||||
break;
|
||||
|
||||
default: return ERROR;
|
||||
default:
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
stm32_tim_reload_counter(dev);
|
||||
|
@ -548,7 +549,10 @@ static int stm32_tim_setchannel(FAR struct stm32_tim_dev_s *dev, uint8_t channel
|
|||
|
||||
/* Further we use range as 0..3; if channel=0 it will also overflow here */
|
||||
|
||||
if (--channel > 4) return ERROR;
|
||||
if (--channel > 4)
|
||||
{
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
/* Assume that channel is disabled and polarity is active high */
|
||||
|
||||
|
@ -699,7 +703,8 @@ static int stm32_tim_setchannel(FAR struct stm32_tim_dev_s *dev, uint8_t channel
|
|||
stm32_tim_gpioconfig(GPIO_TIM4_CH4OUT, mode);
|
||||
break;
|
||||
#endif
|
||||
default: return ERROR;
|
||||
default:
|
||||
return ERROR;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
@ -727,7 +732,8 @@ static int stm32_tim_setchannel(FAR struct stm32_tim_dev_s *dev, uint8_t channel
|
|||
stm32_tim_gpioconfig(GPIO_TIM5_CH4OUT, mode);
|
||||
break;
|
||||
#endif
|
||||
default: return ERROR;
|
||||
default:
|
||||
return ERROR;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
@ -753,7 +759,8 @@ static int stm32_tim_setchannel(FAR struct stm32_tim_dev_s *dev, uint8_t channel
|
|||
case 3:
|
||||
stm32_tim_gpioconfig(GPIO_TIM1_CH4OUT, mode); break;
|
||||
#endif
|
||||
default: return ERROR;
|
||||
default:
|
||||
return ERROR;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
|
|
@ -492,7 +492,7 @@ static inline void up_waittxready(struct up_dev_s *priv)
|
|||
{
|
||||
/* Check the TI bit in the CI register. 1=Transmit buffer empty */
|
||||
|
||||
if ((up_serialin(priv, M16C_UART_C1) & UART_C1_TI) != 0);
|
||||
if ((up_serialin(priv, M16C_UART_C1) & UART_C1_TI) != 0)
|
||||
{
|
||||
/* The transmit buffer is empty... return */
|
||||
break;
|
||||
|
|
|
@ -1506,7 +1506,7 @@ static int unionfs_closedir(FAR struct inode *mountpt,
|
|||
{
|
||||
/* Was this file system opened? */
|
||||
|
||||
if (fu->fu_lower[i] != NULL);
|
||||
if (fu->fu_lower[i] != NULL)
|
||||
{
|
||||
um = &ui->ui_fs[i];
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ static int group_signal_handler(pid_t pid, FAR void *arg)
|
|||
/* Limit to one thread */
|
||||
|
||||
info->atcb = tcb;
|
||||
if (info->ptcb != NULL);
|
||||
if (info->ptcb != NULL)
|
||||
{
|
||||
return 1; /* Terminate the search */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue