Patch "pinctrl: nomadik: Add missing of_node_put() in nmk_pinctrl_probe" has been added to the 5.15-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

    pinctrl: nomadik: Add missing of_node_put() in nmk_pinctrl_probe

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

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



commit 3d7b8a60265bb7509702d661e7a4358412ec5e8a
Author: Miaoqian Lin <linmq006@xxxxxxxxx>
Date:   Mon Mar 7 11:51:16 2022 +0000

    pinctrl: nomadik: Add missing of_node_put() in nmk_pinctrl_probe
    
    [ Upstream commit c09ac191b1f97cfa06f394dbfd7a5db07986cefc ]
    
    This node pointer is returned by of_parse_phandle() with refcount
    incremented in this function. Calling of_node_put() to avoid
    the refcount leak.
    
    Fixes: 32e67eee670e ("pinctrl: nomadik: Allow prcm_base to be extracted from Device Tree")
    Signed-off-by: Miaoqian Lin <linmq006@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20220307115116.25316-1-linmq006@xxxxxxxxx
    Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
index 39828e9c3120..4757bf964d3c 100644
--- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c
+++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
@@ -1883,8 +1883,10 @@ static int nmk_pinctrl_probe(struct platform_device *pdev)
 	}
 
 	prcm_np = of_parse_phandle(np, "prcm", 0);
-	if (prcm_np)
+	if (prcm_np) {
 		npct->prcm_base = of_iomap(prcm_np, 0);
+		of_node_put(prcm_np);
+	}
 	if (!npct->prcm_base) {
 		if (version == PINCTRL_NMK_STN8815) {
 			dev_info(&pdev->dev,



[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