Commit 563fcd64 authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Linus Walleij
Browse files

pinctrl: airoha: Fix return value in pinconf callbacks



Pinctrl stack requires ENOTSUPP error code if the parameter is not
supported by the pinctrl driver. Fix the returned error code in pinconf
callbacks if the operation is not supported.

Fixes: 1c8ace2d ("pinctrl: airoha: Add support for EN7581 SoC")
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/20250822-airoha-pinconf-err-val-fix-v1-1-87b4f264ced2@kernel.org


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent a12946be
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -2696,7 +2696,7 @@ static int airoha_pinconf_get(struct pinctrl_dev *pctrl_dev,
		arg = 1;
		break;
	default:
		return -EOPNOTSUPP;
		return -ENOTSUPP;
	}

	*config = pinconf_to_config_packed(param, arg);
@@ -2788,7 +2788,7 @@ static int airoha_pinconf_set(struct pinctrl_dev *pctrl_dev,
			break;
		}
		default:
			return -EOPNOTSUPP;
			return -ENOTSUPP;
		}
	}

@@ -2805,10 +2805,10 @@ static int airoha_pinconf_group_get(struct pinctrl_dev *pctrl_dev,
		if (airoha_pinconf_get(pctrl_dev,
				       airoha_pinctrl_groups[group].pins[i],
				       config))
			return -EOPNOTSUPP;
			return -ENOTSUPP;

		if (i && cur_config != *config)
			return -EOPNOTSUPP;
			return -ENOTSUPP;

		cur_config = *config;
	}