]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
cpufreq: ti-cpufreq: Fix an incorrect error return value
authorSuman Anna <s-anna@ti.com>
Thu, 31 May 2018 22:21:43 +0000 (17:21 -0500)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Fri, 9 Nov 2018 19:00:32 +0000 (17:00 -0200)
commit66ad2b98eac97cf6b3763a79b55450719a43cd15
tree36bbe1cdc34d61437457d3a2d353dcac7f8800ca
parent2832db203f4d2b7fb9d8674c83a3f14b4469ed27
cpufreq: ti-cpufreq: Fix an incorrect error return value

BugLink: http://bugs.launchpad.net/bugs/1800537
commit e5d295b06d69a1924665a16a4987be475addd00f upstream.

Commit 05829d9431df (cpufreq: ti-cpufreq: kfree opp_data when
failure) has fixed a memory leak in the failure path, however
the patch returned a positive value on get_cpu_device() failure
instead of the previous negative value. Fix this incorrect error
return value properly.

Fixes: 05829d9431df (cpufreq: ti-cpufreq: kfree opp_data when failure)
Cc: 4.14+ <stable@vger.kernel.org> # v4.14+
Signed-off-by: Suman Anna <s-anna@ti.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/cpufreq/ti-cpufreq.c