mirror of
https://github.com/apache/nuttx.git
synced 2026-10-23 23:08:44 +00:00
stm32l4 fix tim channel range checking
This commit is contained in:
parent
541b03b787
commit
0b9a36d142
1 changed files with 1 additions and 1 deletions
|
|
@ -1127,7 +1127,7 @@ static int stm32l4_tim_setchannel(FAR struct stm32l4_tim_dev_s *dev,
|
|||
|
||||
/* Further we use range as 0..3; if channel=0 it will also overflow here */
|
||||
|
||||
if (--channel > 4)
|
||||
if (--channel > 3)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue