From b4883ca449473e8879a062c1f55f9d062c168ae5 Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Tue, 16 May 2017 10:52:43 +0530 Subject: [PATCH] PM / Domains: pdd->dev can't be NULL in genpd_dev_pm_qos_notifier() The pm_domain_data (pdd) pointer is set from genpd_alloc_dev_data() and pdd->dev is guaranteed to be valid. There is no need to check pdd and pdd->dev in rest of the code as pdd->dev will always be valid for a non NULL pdd pointer. Signed-off-by: Viresh Kumar Acked-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki --- drivers/base/power/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index ad19642..bf3945a58 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -443,7 +443,7 @@ static int genpd_dev_pm_qos_notifier(struct notifier_block *nb, pdd = dev->power.subsys_data ? dev->power.subsys_data->domain_data : NULL; - if (pdd && pdd->dev) { + if (pdd) { to_gpd_data(pdd)->td.constraint_changed = true; genpd = dev_to_genpd(dev); } else { -- 2.7.4