usb: host: ohci-ppc-of: Fix refcount leak bug
Subsystems (2)
PATCH 1/1 usb: host: ohci-ppc-of: Fix refcount leak bug
In ohci_hcd_ppc_of_probe(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore.
Signed-off-by Liang He <[email protected]>
--- drivers/usb/host/ohci-ppc-of.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/host/ohci-ppc-of.c +1 -0
@@ -166,6 +166,7 @@ static int ohci_hcd_ppc_of_probe(struct platform_device *op)release_mem_region (res.start,0x4 ); }else pr_debug ("%s: cannot get ehci offset from fdt\n" , __FILE__); +of_node_put (np); }irq_dispose_mapping (irq);
Signature · 1 line
2.25.1
Quoted 6 lines · Liang He
In
ohci_hcd_ppc_of_probe(),of_find_compatible_node()will return a node pointer with refcount incremented. We should useof_node_put()when it is not used anymore.Signed-off-by Liang He <[email protected]>---
Acked-by Alan Stern <[email protected]>
This seems to be the last one; ehci-ppc-of.c was already fixed by an earlier patch.
Quoted 18 lines
drivers/usb/host/ohci-ppc-of.c | 1 + 1 file changed, 1 insertion(+)drivers/usb/host/ohci-ppc-of.c +1
-0@@ -166,6 +166,7 @@ static int ohci_hcd_ppc_of_probe(struct platform_device *op)release_mem_region (res.start,0x4 ); }else pr_debug ("%s: cannot get ehci offset from fdt\n" , __FILE__); +of_node_put (np); }irq_dispose_mapping (irq);Signature · 1 line
2.25.1