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:
Mingjie Shen 2024-04-03 16:23:38 -04:00 committed by Xiang Xiao
parent 99109b8d79
commit 6aae7ba0eb
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ int s32k3xx_pinconfig(uint32_t cfgset)
DEBUGASSERT(port < S32K3XX_NPORTS); DEBUGASSERT(port < S32K3XX_NPORTS);
DEBUGASSERT(pin < S32K3XX_NPINS); 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 */ return -EINVAL; /* Invalid port or pin number */
} }