]> 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)
commitb286dbad37ea25f352c7ea1f82ead674b3f2e0b1
treecf220fbc53828d88e9596e3cdbe01f28e9e69a52
parente28b51a9eb4333f1dc442264a675510281a755df
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: faf3b2e1926a ("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