diff options
author | Ulf Hansson | 2018-05-14 16:52:37 +0200 |
---|---|---|
committer | Rafael J. Wysocki | 2018-05-15 10:02:51 +0200 |
commit | 94ef9b8e2b941ab7e7ce88fa48ce626fa529bf2f (patch) | |
tree | e72c7acabfbf9eac4c6cd17c654af2f1f7f950d0 /drivers/base | |
parent | 71f277a7bf0b0e65e9571940057c70efc4326bc5 (diff) |
PM / Domains: Don't return -EEXIST at attach when PM domain exists
As dev_pm_domain_attach() isn't the only way to assign PM domain pointers
to devices, clearly we must allow a device to have the pointer already
being assigned. For this reason, return 0 instead of -EEXIST.
Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Tested-by: Krzysztof Kozlowski <krzk@kernel.org>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/power/common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/power/common.c b/drivers/base/power/common.c index 5e4b481595bd..390868c2b392 100644 --- a/drivers/base/power/common.c +++ b/drivers/base/power/common.c @@ -106,7 +106,7 @@ int dev_pm_domain_attach(struct device *dev, bool power_on) int ret; if (dev->pm_domain) - return -EEXIST; + return 0; ret = acpi_dev_pm_attach(dev, power_on); if (!ret) |