Skip to content

Commit 34596ba

Browse files
Ye Guojintmlind
authored andcommitted
ARM: OMAP2+: adjust the location of put_device() call in omapdss_init_of
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 <[email protected]> Signed-off-by: Ye Guojin <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
1 parent 80c469a commit 34596ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)