Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 969e9afd authored by Pavel Machek's avatar Pavel Machek Committed by Linus Torvalds
Browse files

[PATCH] sleep: Fix oops in enter_state



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: default avatarPavel Machek <pavel@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 08de1f04
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@ static int enter_state(suspend_state_t state)
{
	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;