Patch "ARM: OMAP2+: Fix refcount leak in omapdss_init_of" has been added to the 5.10-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

    ARM: OMAP2+: Fix refcount leak in omapdss_init_of

to the 5.10-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:
     arm-omap2-fix-refcount-leak-in-omapdss_init_of.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 52df0cbb5bfb82f5e048dbbb4e878344d3f0d74f
Author: Miaoqian Lin <linmq006@xxxxxxxxx>
Date:   Wed Jun 1 08:48:58 2022 +0400

    ARM: OMAP2+: Fix refcount leak in omapdss_init_of
    
    [ Upstream commit 9705db1eff38d6b9114121f9e253746199b759c9 ]
    
    omapdss_find_dss_of_node() calls of_find_compatible_node() to get device
    node. of_find_compatible_node() returns a node pointer with refcount
    incremented, we should use of_node_put() on it when done.
    Add missing of_node_put() in later error path and normal path.
    
    Fixes: e0c827aca0730 ("drm/omap: Populate DSS children in omapdss driver")
    Signed-off-by: Miaoqian Lin <linmq006@xxxxxxxxx>
    Message-Id: <20220601044858.3352-1-linmq006@xxxxxxxxx>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
    Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index fc635eed73ab..f24d4e56ddfc 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -260,11 +260,13 @@ static int __init omapdss_init_of(void)
 
 	if (!pdev) {
 		pr_err("Unable to find DSS platform device\n");
+		of_node_put(node);
 		return -ENODEV;
 	}
 
 	r = of_platform_populate(node, NULL, NULL, &pdev->dev);
 	put_device(&pdev->dev);
+	of_node_put(node);
 	if (r) {
 		pr_err("Unable to populate DSS submodule devices\n");
 		return r;



[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