Skip to content

Commit

Permalink
ARM: OMAP2+: Release device node after it is no longer needed.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Guenter Roeck authored and Tony Lindgren committed Mar 4, 2017
1 parent 10e5778 commit b92675d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -3213,15 +3213,20 @@ int __init omap3xxx_hwmod_init(void)

if (h_sham && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "sham")) {
r = omap_hwmod_register_links(h_sham);
if (r < 0)
if (r < 0) {
of_node_put(bus);
return r;
}
}

if (h_aes && omap3xxx_hwmod_is_hs_ip_block_usable(bus, "aes")) {
r = omap_hwmod_register_links(h_aes);
if (r < 0)
if (r < 0) {
of_node_put(bus);
return r;
}
}
of_node_put(bus);

/*
* Register hwmod links specific to certain ES levels of a
Expand Down

0 comments on commit b92675d

Please sign in to comment.