From: Miaoqian Lin Date: Thu, 2 Jun 2022 11:08:49 +0000 (+0400) Subject: usb: host: Fix refcount leak in ehci_hcd_ppc_of_probe X-Git-Tag: baikal/mips/sdk5.8.2~3094 X-Git-Url: https://git.baikalelectronics.ru/?a=commitdiff_plain;h=2cbb20123c1f75adffacf75dfa04202272523719;p=kernel.git usb: host: Fix refcount leak in ehci_hcd_ppc_of_probe [ Upstream commit a85254b1d7fccb4deffaeb29cad6e729c9decb5c ] 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: 2c9458645465 ("USB: powerpc: Workaround for the PPC440EPX USBH_23 errata [take 3]") Acked-by: Alan Stern Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220602110849.58549-1-linmq006@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- diff --git a/drivers/usb/host/ehci-ppc-of.c b/drivers/usb/host/ehci-ppc-of.c index 6bbaee74f7e7d..28a19693c19fe 100644 --- a/drivers/usb/host/ehci-ppc-of.c +++ b/drivers/usb/host/ehci-ppc-of.c @@ -148,6 +148,7 @@ static int ehci_hcd_ppc_of_probe(struct platform_device *op) } else { ehci->has_amcc_usb23 = 1; } + of_node_put(np); } if (of_get_property(dn, "big-endian", NULL)) {