Commit 796adf53 authored by Yuan Can's avatar Yuan Can Committed by Greg Kroah-Hartman
Browse files

powercap: dtpm_devfreq: Fix error check against dev_pm_qos_add_request()



[ Upstream commit 5209d1b6 ]

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: e4465561 ("powercap/drivers/dtpm: Add dtpm devfreq with energy model support")
Signed-off-by: default avatarYuan Can <yuancan@huawei.com>
Reviewed-by: default avatarLukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/20241018021205.46460-1-yuancan@huawei.com


[ rjw: Subject edit ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent d2826873
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment