Patch "powerpc/powernv: add missing of_node_put() in opal_export_attrs()" 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

    powerpc/powernv: add missing of_node_put() in opal_export_attrs()

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:
     powerpc-powernv-add-missing-of_node_put-in-opal_expo.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 5eb344e9e0f28d1a61833fb1ea173dc0cadd5633
Author: Zheng Yongjun <zhengyongjun3@xxxxxxxxxx>
Date:   Tue Sep 6 14:17:03 2022 +0000

    powerpc/powernv: add missing of_node_put() in opal_export_attrs()
    
    [ Upstream commit 71a92e99c47900cc164620948b3863382cec4f1a ]
    
    After using 'np' returned by of_find_node_by_path(), of_node_put()
    need be called to decrease the refcount.
    
    Fixes: 11fe909d2362 ("powerpc/powernv: Add OPAL exports attributes to sysfs")
    Signed-off-by: Zheng Yongjun <zhengyongjun3@xxxxxxxxxx>
    Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220906141703.118192-1-zhengyongjun3@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index e9d18519e650..5178ec6f3715 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -892,6 +892,7 @@ static void opal_export_attrs(void)
 	kobj = kobject_create_and_add("exports", opal_kobj);
 	if (!kobj) {
 		pr_warn("kobject_create_and_add() of exports failed\n");
+		of_node_put(np);
 		return;
 	}
 



[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