linux-stable/drivers/powercap
Yuan Can 796adf538d powercap: dtpm_devfreq: Fix error check against dev_pm_qos_add_request()
[ Upstream commit 5209d1b654 ]

The caller of the function dev_pm_qos_add_request() checks again a non
zero value but dev_pm_qos_add_request() can return '1' if the request
already exists. Therefore, the setup function fails while the QoS
request actually did not failed.

Fix that by changing the check against a negative value like all the
other callers of the function.

Fixes: e446556173 ("powercap/drivers/dtpm: Add dtpm devfreq with energy model support")
Signed-off-by: Yuan Can <yuancan@huawei.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/20241018021205.46460-1-yuancan@huawei.com
[ rjw: Subject edit ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-01 01:56:05 +01:00
..
dtpm_cpu.c powercap: dtpm_cpu: Fix error check against freq_qos_add_request() 2024-03-26 18:20:36 -04:00
dtpm_devfreq.c powercap: dtpm_devfreq: Fix error check against dev_pm_qos_add_request() 2024-11-01 01:56:05 +01:00
dtpm_subsys.h powercap/drivers/dtpm: Add dtpm devfreq with energy model support 2022-02-04 17:38:09 +01:00
dtpm.c powercap: DTPM: Fix spelling mistake "initialze" -> "initialize" 2022-03-01 18:59:35 +01:00
idle_inject.c sched: Add TASK_ANY for wait_task_inactive() 2022-09-07 21:53:49 +02:00
intel_rapl_common.c powercap: intel_rapl: Use standard Energy Unit for SPR Dram RAPL domain 2022-09-24 19:32:46 +02:00
intel_rapl_msr.c powercap: RAPL: fix invalid initialization for pl4_supported field 2024-09-30 16:23:56 +02:00
Kconfig powercap: RAPL: Fix CONFIG_IOSF_MBI dependency 2023-07-19 16:21:00 +02:00
Makefile powercap/drivers/dtpm: Add dtpm devfreq with energy model support 2022-02-04 17:38:09 +01:00
powercap_sys.c powercap: fix possible name leak in powercap_register_zone() 2023-03-10 09:32:56 +01:00