Commit b5c5b13c authored by Miaoqian Lin's avatar Miaoqian Lin Committed by Greg Kroah-Hartman

usb: host: Fix refcount leak in ehci_hcd_ppc_of_probe

of_find_compatible_node() returns a node pointer with refcount
incremented, we should use of_node_put() on it when done.
Add missing of_node_put() to avoid refcount leak.

Fixes: 796bcae7 ("USB: powerpc: Workaround for the PPC440EPX USBH_23 errata [take 3]")
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20220602110849.58549-1-linmq006@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3497b9a5
...@@ -148,6 +148,7 @@ static int ehci_hcd_ppc_of_probe(struct platform_device *op) ...@@ -148,6 +148,7 @@ static int ehci_hcd_ppc_of_probe(struct platform_device *op)
} else { } else {
ehci->has_amcc_usb23 = 1; ehci->has_amcc_usb23 = 1;
} }
of_node_put(np);
} }
if (of_get_property(dn, "big-endian", NULL)) { if (of_get_property(dn, "big-endian", NULL)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment