mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
arch/arm/src/s32k3xx: Fix incorrect check for invalid port or pin number
Signed-off-by: Mingjie Shen <shen497@purdue.edu>
This commit is contained in:
parent
9ee6928382
commit
47f2bf5788
1 changed files with 1 additions and 1 deletions
|
|
@ -70,7 +70,7 @@ int s32k3xx_pinconfig(uint32_t cfgset)
|
|||
|
||||
DEBUGASSERT(port < S32K3XX_NPORTS);
|
||||
DEBUGASSERT(pin < S32K3XX_NPINS);
|
||||
if ((port >= S32K3XX_NPORTS) && (pin >= S32K3XX_NPINS))
|
||||
if ((port >= S32K3XX_NPORTS) || (pin >= S32K3XX_NPINS))
|
||||
{
|
||||
return -EINVAL; /* Invalid port or pin number */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue