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

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
...@@ -145,7 +145,6 @@ static int _qcom_cc_register_board_clk(struct device *dev, const char *path, ...@@ -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"); clocks_node = of_find_node_by_path("/clocks");
if (clocks_node) if (clocks_node)
node = of_find_node_by_name(clocks_node, path); node = of_find_node_by_name(clocks_node, path);
of_node_put(clocks_node);
if (!node) { if (!node) {
fixed = devm_kzalloc(dev, sizeof(*fixed), GFP_KERNEL); fixed = devm_kzalloc(dev, sizeof(*fixed), GFP_KERNEL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment