6.8-stable review patch. If anyone has any objections, please let me know. ------------------ From: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> [ Upstream commit 91bb23493f8fd115e362d075ebaa3e6f12d1439d ] args->args[0] is passed as parameter "index" to pwm_request_from_chip(). The latter function also checks for index >= npwm, so of_pwm_xlate_with_flags() doesn't need to do that. Link: https://lore.kernel.org/r/b06e445a6ed62a339add727eccb969a33d678386.1704835845.git.u.kleine-koenig@xxxxxxxxxxxxxx Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> Stable-dep-of: 3e551115aee0 ("pwm: meson: Add check for error from clk_round_rate()") Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> --- drivers/pwm/core.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index 606d9ef0c7097..b025d90e201c9 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -111,9 +111,6 @@ of_pwm_xlate_with_flags(struct pwm_chip *chip, const struct of_phandle_args *arg if (args->args_count < 1) return ERR_PTR(-EINVAL); - if (args->args[0] >= chip->npwm) - return ERR_PTR(-EINVAL); - pwm = pwm_request_from_chip(chip, args->args[0], NULL); if (IS_ERR(pwm)) return pwm; -- 2.43.0