Skip to content

Commit 3a50c91

Browse files
Yuuoniygregkh
authored andcommitted
usb: host: Fix refcount leak in ehci_hcd_ppc_of_probe
[ Upstream commit b5c5b13 ] 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: 796bcae ("USB: powerpc: Workaround for the PPC440EPX USBH_23 errata [take 3]") Acked-by: Alan Stern <[email protected]> Signed-off-by: Miaoqian Lin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent e4974ae commit 3a50c91

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/usb/host/ehci-ppc-of.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ static int ehci_hcd_ppc_of_probe(struct platform_device *op)
148148
} else {
149149
ehci->has_amcc_usb23 = 1;
150150
}
151+
of_node_put(np);
151152
}
152153

153154
if (of_get_property(dn, "big-endian", NULL)) {

0 commit comments

Comments
 (0)