提交 40a959d7 编写于 作者: L Liang He 提交者: Greg Kroah-Hartman

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.
Acked-by: NAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: NLiang He <windhl@126.com>
Link: https://lore.kernel.org/r/20220617034637.4003115-1-windhl@126.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 a37599eb
...@@ -166,6 +166,7 @@ static int ohci_hcd_ppc_of_probe(struct platform_device *op) ...@@ -166,6 +166,7 @@ static int ohci_hcd_ppc_of_probe(struct platform_device *op)
release_mem_region(res.start, 0x4); release_mem_region(res.start, 0x4);
} else } else
pr_debug("%s: cannot get ehci offset from fdt\n", __FILE__); pr_debug("%s: cannot get ehci offset from fdt\n", __FILE__);
of_node_put(np);
} }
irq_dispose_mapping(irq); irq_dispose_mapping(irq);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册