aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/power/wakeup.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/power/wakeup.c')
-rw-r--r--drivers/base/power/wakeup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
index 4573c83df6dd..abbbd33e8d8a 100644
--- a/drivers/base/power/wakeup.c
+++ b/drivers/base/power/wakeup.c
@@ -258,7 +258,7 @@ void device_set_wakeup_capable(struct device *dev, bool capable)
258 if (!!dev->power.can_wakeup == !!capable) 258 if (!!dev->power.can_wakeup == !!capable)
259 return; 259 return;
260 260
261 if (device_is_registered(dev)) { 261 if (device_is_registered(dev) && !list_empty(&dev->power.entry)) {
262 if (capable) { 262 if (capable) {
263 if (wakeup_sysfs_add(dev)) 263 if (wakeup_sysfs_add(dev))
264 return; 264 return;