Message ID | E1YMed5-00054V-QK@rmk-PC.arm.linux.org.uk (mailing list archive) |
---|---|
State | RFC, archived |
Headers | show |
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index b3fbc21da2dc..11a1023fa64a 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1509,7 +1509,7 @@ int pm_genpd_remove_device(struct generic_pm_domain *genpd, dev_dbg(dev, "%s()\n", __func__); - if (IS_ERR_OR_NULL(genpd) || IS_ERR_OR_NULL(dev) + if (!pm_genpd_present(genpd) || IS_ERR_OR_NULL(dev) || IS_ERR_OR_NULL(dev->pm_domain) || pd_to_genpd(dev->pm_domain) != genpd) return -EINVAL;