mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-01 10:42:11 +00:00
pwm: Drop duplicate check against chip->npwm in of_pwm_xlate_with_flags()
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@pengutronix.de Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This commit is contained in:
parent
0e253d4193
commit
91bb23493f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user