summaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/power/main.c b/kernel/power/main.c
index f94f4e20115..72419a3b1be 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -198,8 +198,8 @@ static inline int valid_state(suspend_state_t state)
/* all other states need lowlevel support and need to be
* valid to the lowlevel implementation, no valid callback
- * implies that all are valid. */
- if (!pm_ops || (pm_ops->valid && !pm_ops->valid(state)))
+ * implies that none are valid. */
+ if (!pm_ops || !pm_ops->valid || !pm_ops->valid(state))
return 0;
return 1;
}