aboutsummaryrefslogtreecommitdiffstats
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 f94f4e20115a..72419a3b1beb 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -198,8 +198,8 @@ static inline int valid_state(suspend_state_t state)
198 198
199 /* all other states need lowlevel support and need to be 199 /* all other states need lowlevel support and need to be
200 * valid to the lowlevel implementation, no valid callback 200 * valid to the lowlevel implementation, no valid callback
201 * implies that all are valid. */ 201 * implies that none are valid. */
202 if (!pm_ops || (pm_ops->valid && !pm_ops->valid(state))) 202 if (!pm_ops || !pm_ops->valid || !pm_ops->valid(state))
203 return 0; 203 return 0;
204 return 1; 204 return 1;
205} 205}