Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Guenter Roeck <linux@roeck-us.net>
Fixes: ee15faffef11 ("clk: qcom: common: Add API to register board clocks backwards compatibly")
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

authored by

Guenter Roeck and committed by
Stephen Boyd
6ff8ec98 1006cccc

-1
-1
drivers/clk/qcom/common.c
··· 145 145 clocks_node = of_find_node_by_path("/clocks"); 146 146 if (clocks_node) 147 147 node = of_find_node_by_name(clocks_node, path); 148 - of_node_put(clocks_node); 149 148 150 149 if (!node) { 151 150 fixed = devm_kzalloc(dev, sizeof(*fixed), GFP_KERNEL);