PM / devfreq: Fix handling dev_pm_qos_remove_request result
The dev_pm_qos_remove_request function can return 1 if
"aggregated constraint value has changed" so only negative values should
be reported as errors.
Fixes: 27dbc542f6
("PM / devfreq: Use PM QoS for sysfs min/max_freq")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
This commit is contained in:
parent
3bb5ee9aaa
commit
4c6abef7b4
|
@ -705,13 +705,13 @@ static void devfreq_dev_release(struct device *dev)
|
|||
|
||||
if (dev_pm_qos_request_active(&devfreq->user_max_freq_req)) {
|
||||
err = dev_pm_qos_remove_request(&devfreq->user_max_freq_req);
|
||||
if (err)
|
||||
if (err < 0)
|
||||
dev_warn(dev->parent,
|
||||
"Failed to remove max_freq request: %d\n", err);
|
||||
}
|
||||
if (dev_pm_qos_request_active(&devfreq->user_min_freq_req)) {
|
||||
err = dev_pm_qos_remove_request(&devfreq->user_min_freq_req);
|
||||
if (err)
|
||||
if (err < 0)
|
||||
dev_warn(dev->parent,
|
||||
"Failed to remove min_freq request: %d\n", err);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue