Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ff8ec98 authored by Guenter Roeck's avatar Guenter Roeck Committed by Stephen Boyd
Browse files

clk: qcom: Do not drop device node twice



of_find_node_by_name() drops the reference to a passed device node.
It is not necessary to drop it again, and doing so may result in the
device node being released prematurely.

Cc: Rob Herring <robh@kernel.org>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Fixes: ee15faff ("clk: qcom: common: Add API to register board clocks backwards compatibly")
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 1006cccc
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -145,7 +145,6 @@ static int _qcom_cc_register_board_clk(struct device *dev, const char *path,
	clocks_node = of_find_node_by_path("/clocks");
	if (clocks_node)
		node = of_find_node_by_name(clocks_node, path);
	of_node_put(clocks_node);

	if (!node) {
		fixed = devm_kzalloc(dev, sizeof(*fixed), GFP_KERNEL);