You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
mips: cavium-octeon: Fix missing of_node_put() in octeon2_usb_clocks_start
[ Upstream commit 7a9f743cee ]
We should call of_node_put() for the reference 'uctl_node' returned by
of_get_parent() which will increase the refcount. Otherwise, there will
be a refcount leak bug.
Signed-off-by: Liang He <windhl@126.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5e034e03f4
commit
1e39037e44
@@ -86,11 +86,12 @@ static void octeon2_usb_clocks_start(struct device *dev)
|
||||
"refclk-frequency", &clock_rate);
|
||||
if (i) {
|
||||
dev_err(dev, "No UCTL \"refclk-frequency\"\n");
|
||||
of_node_put(uctl_node);
|
||||
goto exit;
|
||||
}
|
||||
i = of_property_read_string(uctl_node,
|
||||
"refclk-type", &clock_type);
|
||||
|
||||
of_node_put(uctl_node);
|
||||
if (!i && strcmp("crystal", clock_type) == 0)
|
||||
is_crystal_clock = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user