summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorYe Guojin <ye.guojin@zte.com.cn>2021-11-16 06:27:26 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-02-23 12:00:00 +0100
commit2d7a327a129ef10588114a1786b300d360dd2381 (patch)
treecb85067d3082fea0b68c718edc869e38e627fd57 /arch/arm
parentfff21185f598ad2d55be74d2a6fc7e9bcfbcd7d7 (diff)
ARM: OMAP2+: adjust the location of put_device() call in omapdss_init_of
[ Upstream commit 34596ba380b03d181e24efd50e2f21045bde3696 ] This was found by coccicheck: ./arch/arm/mach-omap2/display.c, 272, 1-7, ERROR missing put_device; call of_find_device_by_node on line 258, but without a corresponding object release within this function. Move the put_device() call before the if judgment. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Ye Guojin <ye.guojin@zte.com.cn> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/display.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index 46012ca812f4..1bd64f6ba8cf 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -263,9 +263,9 @@ static int __init omapdss_init_of(void)
}
r = of_platform_populate(node, NULL, NULL, &pdev->dev);
+ put_device(&pdev->dev);
if (r) {
pr_err("Unable to populate DSS submodule devices\n");
- put_device(&pdev->dev);
return r;
}