]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
cpufreq: armada-37xx: Fix driver cleanup when registration failed
authorPali Rohár <pali@kernel.org>
Thu, 8 Apr 2021 11:42:20 +0000 (13:42 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 26 May 2021 13:39:13 +0000 (15:39 +0200)
commite1d4b67988e353cd386e8d4661a850aeed905e62
tree15afdcf04bcfcbc9ce5c0f9c4983acfe39fcc94e
parentf45b73c15c5476dbebf41f527f0e942dd0d3db4c
cpufreq: armada-37xx: Fix driver cleanup when registration failed

BugLink: https://bugs.launchpad.net/bugs/1929615
[ Upstream commit 92963903a8e11b9576eb7249f8e81eefa93b6f96 ]

Commit 8db82563451f ("cpufreq: armada-37xx: fix frequency calculation for
opp") changed calculation of frequency passed to the dev_pm_opp_add()
function call. But the code for dev_pm_opp_remove() function call was not
updated, so the driver cleanup phase does not work when registration fails.

This fixes the issue by using the same frequency in both calls.

Signed-off-by: Pali Rohár <pali@kernel.org>
Acked-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Tested-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Tested-by: Anders Trier Olesen <anders.trier.olesen@gmail.com>
Tested-by: Philip Soares <philips@netisense.com>
Fixes: 8db82563451f ("cpufreq: armada-37xx: fix frequency calculation for opp")
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/cpufreq/armada-37xx-cpufreq.c