From: Pavel Machek <pavel@ucw.cz>
To: Andrew Morton <akpm@osdl.org>,
kernel list <linux-kernel@vger.kernel.org>,
shaohua.li@intel.com
Subject: [PATCH] sleep: Fix oops in enter_state
Date: Tue, 8 Nov 2005 10:21:37 +0100 [thread overview]
Message-ID: <20051108092137.GA16848@elf.ucw.cz> (raw)
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!
reply other threads:[~2005-11-08 9:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051108092137.GA16848@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shaohua.li@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®