aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/power/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/power/main.c')
-rw-r--r--drivers/base/power/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 0e3991a437c6..93a146940b91 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -81,7 +81,9 @@ int device_pm_add(struct device *dev)
81 WARN_ON(true); 81 WARN_ON(true);
82 error = -EBUSY; 82 error = -EBUSY;
83 } else { 83 } else {
84 list_add_tail(&dev->power.entry, &dpm_active); 84 error = dpm_sysfs_add(dev);
85 if (!error)
86 list_add_tail(&dev->power.entry, &dpm_active);
85 } 87 }
86 mutex_unlock(&dpm_list_mtx); 88 mutex_unlock(&dpm_list_mtx);
87 return error; 89 return error;