> When hibernation failed due to an error in swsusp_write() called by > hibernate(), it skips calling "power_down()" and returns. When > hibernate() is called again (probably after fixing up so that > swsusp_write() wouldn't fail again), before "in_suspend = 1" of > create_image is called, in_suspend should be 0. However, because > hibernate() did not reset "in_suspend" after a failure, it's already 1. > > This patch fixes such inconsistency of "in_suspend" value. Ack. > Signed-off-by: MyungJoo Ham <myungjoo.ham@xxxxxxxxxxx> > Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx> > --- > kernel/power/hibernate.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c > index e6c498d..e27bf22 100644 > --- a/kernel/power/hibernate.c > +++ b/kernel/power/hibernate.c > @@ -643,6 +643,7 @@ int hibernate(void) > swsusp_free(); > if (!error) > power_down(); > + in_suspend = 0; > } else { > pr_debug("PM: Image restored successfully.\n"); > } -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm