]> git.baikalelectronics.ru Git - kernel.git/commit
powercap: DTPM: Fix suspend failure and kernel warning
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 8 Nov 2021 06:23:44 +0000 (07:23 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 10 Nov 2021 20:18:14 +0000 (21:18 +0100)
commit8898d3ebc69812a74c9cefa49581693662346496
treecf220fbc53828d88e9596e3cdbe01f28e9e69a52
parent2a12ed77b12af6bc3fba6b71b3e4c107024002ee
powercap: DTPM: Fix suspend failure and kernel warning

When the ENERGY_MODEL and DTPM_CPU are enabled but actually without
any energy model, at cpu hotplug time, the dead cpuhp callback fails
leading to the warning.

Actually, the check could be simplified and we only do an action if
the dtpm cpu is enabled, otherwise we bail out without error.

Fixes: 9a33e7c075ea ("powercap/drivers/dtpm: Simplify the dtpm table")
Reported-by: Kenneth R. Crudup <kenny@panix.com>
Tested-by: Kenneth R. Crudup <kenny@panix.com>
Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/powercap/dtpm_cpu.c