Patch "pwm: Drop duplicate check against chip->npwm in of_pwm_xlate_with_flags()" has been added to the 6.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    pwm: Drop duplicate check against chip->npwm in of_pwm_xlate_with_flags()

to the 6.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pwm-drop-duplicate-check-against-chip-npwm-in-of_pwm.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 73391bd5ddba01f97b6da2bc794b0e13a846b1f9
Author: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
Date:   Tue Jan 9 22:34:35 2024 +0100

    pwm: Drop duplicate check against chip->npwm in of_pwm_xlate_with_flags()
    
    [ 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>

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;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux