Patch "clk: nomadik: Add missing of_node_put()" has been added to the 6.0-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: nomadik: Add missing of_node_put()

to the 6.0-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-nomadik-add-missing-of_node_put.patch
and it can be found in the queue-6.0 subdirectory.

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



commit 2a7d1a4282444c9b3d89dee5de053d92e5f3fc40
Author: Liang He <windhl@xxxxxxx>
Date:   Fri Jun 17 09:43:08 2022 +0800

    clk: nomadik: Add missing of_node_put()
    
    [ Upstream commit 28a0b0984e76df8fd64b6850fa56cf5201e6e638 ]
    
    In nomadik_src_init(), of_find_matching_node() will return a node
    pointer with refcount incremented. We should use of_node_put() in
    fail path or when it is not used anymore.
    
    Signed-off-by: Liang He <windhl@xxxxxxx>
    Link: https://lore.kernel.org/r/20220617014308.4001511-1-windhl@xxxxxxx
    Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
    Signed-off-by: Stephen Boyd <sboyd@xxxxxxxxxx>
    Stable-dep-of: 89ab396d712f ("clk: meson: Hold reference returned by of_get_parent()")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/clk/clk-nomadik.c b/drivers/clk/clk-nomadik.c
index bad2677e11ae..71fbe687fa7b 100644
--- a/drivers/clk/clk-nomadik.c
+++ b/drivers/clk/clk-nomadik.c
@@ -99,7 +99,7 @@ static void __init nomadik_src_init(void)
 	if (!src_base) {
 		pr_err("%s: must have src parent node with REGS (%pOFn)\n",
 		       __func__, np);
-		return;
+		goto out_put;
 	}
 
 	/* Set all timers to use the 2.4 MHz TIMCLK */
@@ -132,6 +132,9 @@ static void __init nomadik_src_init(void)
 	}
 	writel(val, src_base + SRC_XTALCR);
 	register_reboot_notifier(&nomadik_clk_reboot_notifier);
+
+out_put:
+	of_node_put(np);
 }
 
 /**



[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