You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
usb: host: ohci-ppc-of: Fix refcount leak bug
[ Upstream commit 40a959d704 ]
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: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Liang He <windhl@126.com>
Link: https://lore.kernel.org/r/20220617034637.4003115-1-windhl@126.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d86c6447ee
commit
cb5dd65e88
@@ -169,6 +169,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);
|
||||
|
||||
Reference in New Issue
Block a user