mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 15:15:47 +00:00
MIPS: Octeon: add missing of_node_put()
The call to of_find_node_by_name returns a node pointer with refcount incremented thus it must be explicitly decremented here after the last usage. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Paul Burton <paul.burton@mips.com> Patchwork: https://patchwork.linux-mips.org/patch/19558/ Cc: Ralf Baechle <ralf@linux-mips.org> Cc: James Hogan <jhogan@kernel.org> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org
This commit is contained in:
parent
351fdddd36
commit
b1259519e6
1 changed files with 2 additions and 0 deletions
|
@ -322,6 +322,7 @@ static int __init octeon_ehci_device_init(void)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
pd = of_find_device_by_node(ehci_node);
|
pd = of_find_device_by_node(ehci_node);
|
||||||
|
of_node_put(ehci_node);
|
||||||
if (!pd)
|
if (!pd)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -384,6 +385,7 @@ static int __init octeon_ohci_device_init(void)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
pd = of_find_device_by_node(ohci_node);
|
pd = of_find_device_by_node(ohci_node);
|
||||||
|
of_node_put(ohci_node);
|
||||||
if (!pd)
|
if (!pd)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue