From: Guenter Roeck Date: Sat, 11 Feb 2017 23:04:56 +0000 (-0800) Subject: clk: qcom: Do not drop device node twice X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6ff8ec98e12f984b9d62e43f83b0a3c44e2bdc12;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Guenter Roeck Fixes: ee15faffef11 ("clk: qcom: common: Add API to register board clocks backwards compatibly") Signed-off-by: Stephen Boyd --- diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c index cfab7b400381..03f9d316f969 100644 --- a/drivers/clk/qcom/common.c +++ b/drivers/clk/qcom/common.c @@ -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);