* [PATCH] sleep: Fix oops in enter_state
@ 2005-11-08 9:21 Pavel Machek
0 siblings, 0 replies; only message in thread
From: Pavel Machek @ 2005-11-08 9:21 UTC (permalink / raw)
To: Andrew Morton, kernel list, shaohua.li
If ACPI sleep is not configured, but someone still wants to run
swsusp, he'd get oops in enter_state. This is regression since 2.6.14
and this fixes it.
Signed-off-by: Pavel Machek <pavel@suse.cz>
diff --git a/kernel/power/main.c b/kernel/power/main.c
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -167,7 +167,7 @@ static int enter_state(suspend_state_t s
{
int error;
- if (pm_ops->valid && !pm_ops->valid(state))
+ if (pm_ops && pm_ops->valid && !pm_ops->valid(state))
return -ENODEV;
if (down_trylock(&pm_sem))
return -EBUSY;
--
Thanks, Sharp!
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-11-08 9:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-08 9:21 [PATCH] sleep: Fix oops in enter_state Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®