Patch "clk: renesas: cpg-mssr: Fix 'soc' node handling in cpg_mssr_reserved_init()" has been added to the 6.12-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

    clk: renesas: cpg-mssr: Fix 'soc' node handling in cpg_mssr_reserved_init()

to the 6.12-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:
     clk-renesas-cpg-mssr-fix-soc-node-handling-in-cpg_ms.patch
and it can be found in the queue-6.12 subdirectory.

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



commit f7c0eda7e1c22db13d036ce0f520450efab0c381
Author: Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>
Date:   Thu Oct 31 13:43:16 2024 +0100

    clk: renesas: cpg-mssr: Fix 'soc' node handling in cpg_mssr_reserved_init()
    
    [ Upstream commit a6ca7e6240f0651412da6a17d0e7a8f66d3455a6 ]
    
    A device_node reference obtained via of_find_node_by_path() requires
    explicit calls to of_node_put() after it is no longer required to avoid
    leaking the resource.
    
    Instead of adding the missing calls to of_node_put() in all execution
    paths, use the cleanup attribute for 'soc' by means of the __free()
    macro, which automatically calls of_node_put() when the variable goes
    out of scope.
    
    Fixes: 6aa175476490 ("clk: renesas: cpg-mssr: Ignore all clocks assigned to non-Linux system")
    Signed-off-by: Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>
    Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
    Link: https://lore.kernel.org/20241031-clk-renesas-cpg-mssr-cleanup-v2-1-0010936d1154@xxxxxxxxx
    Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/clk/renesas/renesas-cpg-mssr.c b/drivers/clk/renesas/renesas-cpg-mssr.c
index 1b421b8097965..0f27c33192e10 100644
--- a/drivers/clk/renesas/renesas-cpg-mssr.c
+++ b/drivers/clk/renesas/renesas-cpg-mssr.c
@@ -981,7 +981,7 @@ static void __init cpg_mssr_reserved_exit(struct cpg_mssr_priv *priv)
 static int __init cpg_mssr_reserved_init(struct cpg_mssr_priv *priv,
 					 const struct cpg_mssr_info *info)
 {
-	struct device_node *soc = of_find_node_by_path("/soc");
+	struct device_node *soc __free(device_node) = of_find_node_by_path("/soc");
 	struct device_node *node;
 	uint32_t args[MAX_PHANDLE_ARGS];
 	unsigned int *ids = NULL;




[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