mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 21:16:39 +07:00
PM / QoS: Fix writing 'auto' to pm_qos_latency_tolerance_us
If it was already 'auto', then writing 'auto' again would incorrectly fail. Signed-off-by: Andy Lutomirski <luto@kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
ee061da8d9
commit
80a6f7c79b
@ -856,7 +856,10 @@ int dev_pm_qos_update_user_latency_tolerance(struct device *dev, s32 val)
|
||||
struct dev_pm_qos_request *req;
|
||||
|
||||
if (val < 0) {
|
||||
ret = -EINVAL;
|
||||
if (val == PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT)
|
||||
ret = 0;
|
||||
else
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
req = kzalloc(sizeof(*req), GFP_KERNEL);
|
||||
|
Loading…
Reference in New Issue
Block a user