Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

-3
-3
drivers/pwm/core.c
··· 111 111 if (args->args_count < 1) 112 112 return ERR_PTR(-EINVAL); 113 113 114 - if (args->args[0] >= chip->npwm) 115 - return ERR_PTR(-EINVAL); 116 - 117 114 pwm = pwm_request_from_chip(chip, args->args[0], NULL); 118 115 if (IS_ERR(pwm)) 119 116 return pwm;