Skip to content

Commit b4883ca

Browse files
vireshkrafaeljw
authored andcommitted
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 <viresh.kumar@linaro.org> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 5e68ebd commit b4883ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/base/power/domain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ static int genpd_dev_pm_qos_notifier(struct notifier_block *nb,
443443

444444
pdd = dev->power.subsys_data ?
445445
dev->power.subsys_data->domain_data : NULL;
446-
if (pdd && pdd->dev) {
446+
if (pdd) {
447447
to_gpd_data(pdd)->td.constraint_changed = true;
448448
genpd = dev_to_genpd(dev);
449449
} else {

0 commit comments

Comments
 (0)