Skip to content

Commit

Permalink
ARM: OMAP2+: adjust the location of put_device() call in omapdss_init_of
Browse files Browse the repository at this point in the history
[ 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>
  • Loading branch information
Ye Guojin authored and gregkh committed Feb 23, 2022
1 parent 3f6278b commit 4210b4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/display.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 4210b4a

Please sign in to comment.