summaryrefslogtreecommitdiff
path: root/drivers/base/power/qos.c
diff options
context:
space:
mode:
authorAndrew Lutomirski <luto@kernel.org>2016-11-30 04:11:51 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-12-01 00:34:23 +0300
commit80a6f7c79b7822726a096ce9e01cc00a1eacc2c4 (patch)
treea79f28704a374349f163465d8fa7b7e6e4326142 /drivers/base/power/qos.c
parentee061da8d9dfc30ced06f25c18694cffa70eac1e (diff)
downloadlinux-80a6f7c79b7822726a096ce9e01cc00a1eacc2c4.tar.xz
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>
Diffstat (limited to 'drivers/base/power/qos.c')
-rw-r--r--drivers/base/power/qos.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/base/power/qos.c b/drivers/base/power/qos.c
index 7f3646e459cb..6a1f2c7e01ea 100644
--- a/drivers/base/power/qos.c
+++ b/drivers/base/power/qos.c
@@ -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);