aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq-dt-platdev.c
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2017-07-21 21:53:30 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-07-26 22:54:01 +0200
commit38c1c6a9f3c4c919c82cc20d4c70814c64574887 (patch)
tree7d48cd2ccf8d16b78db61119b979e27ef4e38a56 /drivers/cpufreq/cpufreq-dt-platdev.c
parentfc4c709fc88d5603b235ba18d11f6dba811e1664 (diff)
downloadlinux-38c1c6a9f3c4c919c82cc20d4c70814c64574887.tar.gz
cpufreq: s5pv210: add missing of_node_put()
for_each_compatible_node performs an of_node_get on each iteration, so a return from the loop requires an of_node_put. The semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // <smpl> @@ local idexpression n; expression e,e1,e2; statement S; iterator i1; iterator name for_each_compatible_node; @@ for_each_compatible_node(n,e1,e2) { ... ( of_node_put(n); | e = n | return n; | i1(...,n,...) S | + of_node_put(n); ? return ...; ) ... } // </smpl> Additionally, call of_node_put on the previous value of np, obtained from of_find_compatible_node, that is no longer accessible at the point of the for_each_compatible_node. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq-dt-platdev.c')
0 files changed, 0 insertions, 0 deletions