Patch "pwm: rockchip: rockchip_pwm_probe(): Remove superfluous clk_unprepare()" has been added to the 5.11-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: rockchip: rockchip_pwm_probe(): Remove superfluous clk_unprepare()

to the 5.11-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-rockchip-rockchip_pwm_probe-remove-superfluous-c.patch
and it can be found in the queue-5.11 subdirectory.

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



commit 7a32c774e0763499ea99523f7c064f25f8f04288
Author: Simon South <simon@xxxxxxxxxxxxxx>
Date:   Tue Jan 19 11:12:06 2021 -0500

    pwm: rockchip: rockchip_pwm_probe(): Remove superfluous clk_unprepare()
    
    [ Upstream commit d5d8d675865ccddfe4da26c85f22c55cec663bf2 ]
    
    If rockchip_pwm_probe() fails to register a PWM device it calls
    clk_unprepare() for the device's PWM clock, without having first disabled
    the clock and before jumping to an error handler that also unprepares
    it. This is likely to produce warnings from the kernel about the clock
    being unprepared when it is still enabled, and then being unprepared when
    it has already been unprepared.
    
    Prevent these warnings by removing this unnecessary call to
    clk_unprepare().
    
    Fixes: 48cf973cae33 ("pwm: rockchip: Avoid glitches on already running PWMs")
    Signed-off-by: Simon South <simon@xxxxxxxxxxxxxx>
    Signed-off-by: Thierry Reding <thierry.reding@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm-rockchip.c
index e6929bc739684..90f969f9f5e2b 100644
--- a/drivers/pwm/pwm-rockchip.c
+++ b/drivers/pwm/pwm-rockchip.c
@@ -351,7 +351,6 @@ static int rockchip_pwm_probe(struct platform_device *pdev)
 
 	ret = pwmchip_add(&pc->chip);
 	if (ret < 0) {
-		clk_unprepare(pc->clk);
 		dev_err(&pdev->dev, "pwmchip_add() failed: %d\n", ret);
 		goto err_pclk;
 	}



[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