Patch "can: ti_hecc: ti_hecc_probe(): add missed clk_disable_unprepare() in error path" has been added to the 5.4-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

    can: ti_hecc: ti_hecc_probe(): add missed clk_disable_unprepare() in error path

to the 5.4-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:
     can-ti_hecc-ti_hecc_probe-add-missed-clk_disable_unp.patch
and it can be found in the queue-5.4 subdirectory.

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



commit 0ccab5e0d9b824e2df387c27a3be9178d23a19d0
Author: Zhang Changzhong <zhangchangzhong@xxxxxxxxxx>
Date:   Fri Jul 17 16:04:39 2020 +0800

    can: ti_hecc: ti_hecc_probe(): add missed clk_disable_unprepare() in error path
    
    [ Upstream commit e002103b36a695f7cb6048b96da73e66c86ddffb ]
    
    The driver forgets to call clk_disable_unprepare() in error path after
    a success calling for clk_prepare_enable().
    
    Fix it by adding a clk_disable_unprepare() in error path.
    
    Signed-off-by: Zhang Changzhong <zhangchangzhong@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/1594973079-27743-1-git-send-email-zhangchangzhong@xxxxxxxxxx
    Fixes: befa60113ce7 ("can: ti_hecc: add missing prepare and unprepare of the clock")
    Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c
index 31ad364a89bbe..d3a7631eecaf2 100644
--- a/drivers/net/can/ti_hecc.c
+++ b/drivers/net/can/ti_hecc.c
@@ -936,7 +936,7 @@ static int ti_hecc_probe(struct platform_device *pdev)
 	err = clk_prepare_enable(priv->clk);
 	if (err) {
 		dev_err(&pdev->dev, "clk_prepare_enable() failed\n");
-		goto probe_exit_clk;
+		goto probe_exit_release_clk;
 	}
 
 	priv->offload.mailbox_read = ti_hecc_mailbox_read;
@@ -945,7 +945,7 @@ static int ti_hecc_probe(struct platform_device *pdev)
 	err = can_rx_offload_add_timestamp(ndev, &priv->offload);
 	if (err) {
 		dev_err(&pdev->dev, "can_rx_offload_add_timestamp() failed\n");
-		goto probe_exit_clk;
+		goto probe_exit_disable_clk;
 	}
 
 	err = register_candev(ndev);
@@ -963,7 +963,9 @@ static int ti_hecc_probe(struct platform_device *pdev)
 
 probe_exit_offload:
 	can_rx_offload_del(&priv->offload);
-probe_exit_clk:
+probe_exit_disable_clk:
+	clk_disable_unprepare(priv->clk);
+probe_exit_release_clk:
 	clk_put(priv->clk);
 probe_exit_candev:
 	free_candev(ndev);



[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