Skip to content

Commit 94ef9b8

Browse files
storulfrafaeljw
authored andcommitted
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 <[email protected]> Signed-off-by: Ulf Hansson <[email protected]> Tested-by: Tested-by: Krzysztof Kozlowski <[email protected]> Tested-by: Tony Lindgren <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 71f277a commit 94ef9b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/base/power/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ int dev_pm_domain_attach(struct device *dev, bool power_on)
106106
int ret;
107107

108108
if (dev->pm_domain)
109-
return -EEXIST;
109+
return 0;
110110

111111
ret = acpi_dev_pm_attach(dev, power_on);
112112
if (!ret)

0 commit comments

Comments
 (0)