Skip to content

Commit b92675d

Browse files
groecktmlind
authored andcommitted
ARM: OMAP2+: Release device node after it is no longer needed.
The device node returned by of_find_node_by_name() needs to be released after it is no longer needed to avoid a device node leak. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
1 parent 10e5778 commit b92675d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

arch/arm/mach-omap2/omap_hwmod_3xxx_data.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3213,15 +3213,20 @@ int __init omap3xxx_hwmod_init(void)
32133213

32143214
if (h_sham && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "sham")) {
32153215
r = omap_hwmod_register_links(h_sham);
3216-
if (r < 0)
3216+
if (r < 0) {
3217+
of_node_put(bus);
32173218
return r;
3219+
}
32183220
}
32193221

32203222
if (h_aes && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "aes")) {
32213223
r = omap_hwmod_register_links(h_aes);
3222-
if (r < 0)
3224+
if (r < 0) {
3225+
of_node_put(bus);
32233226
return r;
3227+
}
32243228
}
3229+
of_node_put(bus);
32253230

32263231
/*
32273232
* Register hwmod links specific to certain ES levels of a

0 commit comments

Comments
 (0)