[PATCH] swsusp: Fix resume error path in platform mode
authorRafael J. Wysocki <rjw@sisk.pl>
Fri, 16 Mar 2007 21:38:06 +0000 (13:38 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sat, 17 Mar 2007 02:25:03 +0000 (19:25 -0700)
If swsusp is using the platform mode during the resume and the image cannot
be read, the platform mode should be switched off before software_resume()
returns.  Make it happen.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/power/disk.c

index 406b20adb27ad820a455b93a836ab636cbf65436..a200c5fc42eedd67e8157bcbc6943d9baf7c7d87 100644 (file)
@@ -251,6 +251,7 @@ static int software_resume(void)
        error = swsusp_read();
        if (error) {
                swsusp_free();
+               platform_finish();
                goto Thaw;
        }