summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorpchiang <pchiang@nvidia.com>2014-01-17 17:51:49 +0800
committerTerje Bergstrom <tbergstrom@nvidia.com>2014-02-10 06:30:02 -0800
commitebc64dcd25c46d2ba7cd81b7e7febf3b1ad3761c (patch)
treea0e38c43d6b07e125f306833da2e79c161e5525f /drivers/base
parent4b8581c6b32f6ff27830b83f837624eeb0d10e35 (diff)
PM / QoS: check NULL and ENODEV on power.qos
fix kernel panic when qos is not null Bug 1442069 Bug 1430231 Change-Id: I8810009e8f2a72730cfb253b245434d9e0806b9c Signed-off-by: pchiang <pchiang@nvidia.com> Reviewed-on: http://git-master/r/357069 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/360175 GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/qos.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/power/qos.c b/drivers/base/power/qos.c
index 4ef17e93aa1b..c7111e06ea23 100644
--- a/drivers/base/power/qos.c
+++ b/drivers/base/power/qos.c
@@ -245,7 +245,7 @@ void dev_pm_qos_constraints_destroy(struct device *dev)
__dev_pm_qos_hide_flags(dev);
qos = dev->power.qos;
- if (!qos)
+ if (IS_ERR_OR_NULL(qos))
goto out;
/* Flush the constraints lists for the device. */