mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-04 01:36:58 -05:00
xtensa: xtfpga: Fix refcount leak bug in setup
commit 173940b3ae40114d4179c251a98ee039dc9cd5b3 upstream. In machine_setup(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Cc: [email protected] Signed-off-by: Liang He <[email protected]> Message-Id: <[email protected]> Signed-off-by: Max Filippov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
f0fc7cdf5f
commit
a52972ee70
1 changed files with 1 additions and 0 deletions
|
|
@ -148,6 +148,7 @@ static int __init machine_setup(void)
|
|||
|
||||
if ((eth = of_find_compatible_node(eth, NULL, "opencores,ethoc")))
|
||||
update_local_mac(eth);
|
||||
of_node_put(eth);
|
||||
return 0;
|
||||
}
|
||||
arch_initcall(machine_setup);
|
||||
|
|
|
|||
Loading…
Reference in a new issue