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: ee15faffef ("clk: qcom: common: Add API to register board clocks backwards compatibly")
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This commit is contained in:
Guenter Roeck 2017-02-11 15:04:56 -08:00 коммит произвёл Stephen Boyd
Родитель 1006ccccd0
Коммит 6ff8ec98e1
1 изменённых файлов: 0 добавлений и 1 удалений

Просмотреть файл

@ -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);