summaryrefslogtreecommitdiffstats
path: root/kernel/power/swap.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2006-07-10 04:45:01 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-10 13:24:22 -0700
commitaeceb15738958fe59cd9fe537f40317b1a3bc731 (patch)
tree98ab1b493886dbd03eace4ebe6cde335b3523e00 /kernel/power/swap.c
parent712f403af6682c942d8ff8bfbd54eed03643a796 (diff)
downloadop-kernel-dev-aeceb15738958fe59cd9fe537f40317b1a3bc731.zip
op-kernel-dev-aeceb15738958fe59cd9fe537f40317b1a3bc731.tar.gz
[PATCH] swsusp: fix panic when signature can't be read
Do not panic a machine when swsusp signature can't be read. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/power/swap.c')
-rw-r--r--kernel/power/swap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index a57c661..f1dd146b 100644
--- a/kernel/power/swap.c
+++ b/kernel/power/swap.c
@@ -311,8 +311,10 @@ static atomic_t io_done = ATOMIC_INIT(0);
static int end_io(struct bio *bio, unsigned int num, int err)
{
- if (!test_bit(BIO_UPTODATE, &bio->bi_flags))
- panic("I/O error reading memory image");
+ if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) {
+ printk(KERN_ERR "I/O error reading swsusp image.\n");
+ return -EIO;
+ }
atomic_set(&io_done, 0);
return 0;
}
OpenPOWER on IntegriCloud