diff options
Diffstat (limited to 'kernel/power')
-rw-r--r-- | kernel/power/hibernate.c | 7 | ||||
-rw-r--r-- | kernel/power/suspend.c | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index 8f7b1db..8884c27 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c @@ -623,7 +623,7 @@ int hibernate(void) /* Allocate memory management structures */ error = create_basic_memory_bitmaps(); if (error) - goto Exit; + goto Enable_umh; printk(KERN_INFO "PM: Syncing filesystems ... "); sys_sync(); @@ -631,7 +631,7 @@ int hibernate(void) error = prepare_processes(); if (error) - goto Finish; + goto Free_bitmaps; if (hibernation_test(TEST_FREEZER)) goto Thaw; @@ -663,8 +663,9 @@ int hibernate(void) Thaw: thaw_processes(); - Finish: + Free_bitmaps: free_basic_memory_bitmaps(); + Enable_umh: usermodehelper_enable(); Exit: pm_notifier_call_chain(PM_POST_HIBERNATION); diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c index 63774df..61e6347 100644 --- a/kernel/power/suspend.c +++ b/kernel/power/suspend.c @@ -310,7 +310,7 @@ int enter_state(suspend_state_t state) */ int pm_suspend(suspend_state_t state) { - if (state > PM_SUSPEND_ON && state <= PM_SUSPEND_MAX) + if (state > PM_SUSPEND_ON && state < PM_SUSPEND_MAX) return enter_state(state); return -EINVAL; } |