PM / devfreq: exynos-ppmu: remove unneeded of_node_put()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Fri, 8 Jul 2016 13:44:04 +0000 (13:44 +0000)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 6 Sep 2016 04:08:40 +0000 (13:08 +0900)
for_each_child_of_node() performs an of_node_put() on each iteration, so
putting an of_node_put() before a continue results in a double put.

Generated by: scripts/coccinelle/iterators/device_node_continue.cocci

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
drivers/devfreq/event/exynos-ppmu.c

index 845bf25fb9fb413b355f828592d0d1ce8207c731..f55cf0eb2a661652c77a79076fd5a281032cdedc 100644 (file)
@@ -406,8 +406,6 @@ static int of_get_devfreq_events(struct device_node *np,
                of_property_read_string(node, "event-name", &desc[j].name);
 
                j++;
-
-               of_node_put(node);
        }
        info->desc = desc;