|
@@ -460,8 +460,8 @@ static int nsp_pinmux_enable(struct pinctrl_dev *pctrl_dev,
|
|
|
const struct nsp_pin_function *func;
|
|
|
const struct nsp_pin_group *grp;
|
|
|
|
|
|
- if (grp_select > pinctrl->num_groups ||
|
|
|
- func_select > pinctrl->num_functions)
|
|
|
+ if (grp_select >= pinctrl->num_groups ||
|
|
|
+ func_select >= pinctrl->num_functions)
|
|
|
return -EINVAL;
|
|
|
|
|
|
func = &pinctrl->functions[func_select];
|