Skip to content

Commit 717f2fa

Browse files
Ye Guojingregkh
authored andcommitted
ARM: OMAP2+: adjust the location of put_device() call in omapdss_init_of
[ Upstream commit 34596ba ] 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>
1 parent 6932353 commit 717f2fa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎arch/arm/mach-omap2/display.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,9 @@ static int __init omapdss_init_of(void)
263263
}
264264

265265
r = of_platform_populate(node, NULL, NULL, &pdev->dev);
266+
put_device(&pdev->dev);
266267
if (r) {
267268
pr_err("Unable to populate DSS submodule devices\n");
268-
put_device(&pdev->dev);
269269
return r;
270270
}
271271

0 commit comments

Comments
 (0)