usb: host: Fix refcount leak in ehci_hcd_ppc_of_probe
Subsystems (2)
PATCH 1/1 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 796bcae7361c ("USB: powerpc: Workaround for the PPC440EPX USBH_23 errata [take 3]")
Signed-off-by Miaoqian Lin <[email protected]>
--- drivers/usb/host/ehci-ppc-of.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/host/ehci-ppc-of.c +1 -0
@@ -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 )) {
Signature · 1 line
2.25.1
Quoted 7 lines · Miaoqian Lin
of_find_compatible_node()returns a node pointer with refcount incremented, we should useof_node_put()on it when done. Add missingof_node_put()to avoid refcount leak.Fixes 796bcae7361c ("USB: powerpc: Workaround for the PPC440EPX USBH_23 errata [take 3]")Signed-off-by Miaoqian Lin <[email protected]>---
Acked-by Alan Stern <[email protected]>
Quoted 18 lines
drivers/usb/host/ehci-ppc-of.c | 1 + 1 file changed, 1 insertion(+)drivers/usb/host/ehci-ppc-of.c +1
-0@@ -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 )) {Signature · 1 line
2.25.1