]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: dt: call of_node_put() before error out
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 27 Jun 2016 05:50:13 +0000 (14:50 +0900)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 27 Jun 2016 21:49:44 +0000 (23:49 +0200)
commitf8d97b82d33c9f14cd06f77cf7c39c89cfbb1d90
tree6cb0519a526314919303e3819ca7b55407b5a64d
parent718a1bc5278d4ea2ac54c39268f53888e93296f7
cpufreq: dt: call of_node_put() before error out

If of_match_node() fails, this init function bails out without
calling of_node_put().

Also change of_node_put(of_root) to of_node_put(np); both of them
hold the same pointer, but it seems better to call of_node_put()
against the node returned by of_find_node_by_path().

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq-dt-platdev.c