]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: ti: Fix 'of_node_put' being called twice in error handling path
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Sat, 19 Aug 2017 20:22:46 +0000 (22:22 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 24 Aug 2017 23:43:07 +0000 (01:43 +0200)
commitbd972f36506e317c7ac0af00f7c5a6daf3e35650
tree9ca86b9e7944ae758dd9df2a80cbb31033ef751c
parent1631824567429e8ef8be901cfbac4a05bc93b8a8
cpufreq: ti: Fix 'of_node_put' being called twice in error handling path

If 'dev_pm_opp_set_supported_hw()' fails, 'opp_data->opp_node' refcount
will be decremented 2 times.
One, just a few lines above, and another one in the error handling path.

Fix it by simply moving the 'of_node_put' call of the normal path.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/ti-cpufreq.c