summaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
authorCon Kolivas <kernel@kolivas.org>2006-03-26 01:37:11 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 08:56:55 -0800
commite655a250d5fc12b6dfe0d436180ba4a3bfffdc9f (patch)
treefc914e0c146f82139ff7e40d30ec642f3663aa2a /kernel/power
parent9f4fd61fa7c13ea905dac18b9baa766a35b88485 (diff)
downloadlinux-e655a250d5fc12b6dfe0d436180ba4a3bfffdc9f.tar.bz2
[PATCH] swswsup: return correct load_image error
If there's an error in load_image() we should return that without checking snapshot_image_loaded. Signed-off-by: Con Kolivas <kernel@kolivas.org> Acked-by: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/swap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index 9177f3f73a6c..044b8e0c1025 100644
--- a/kernel/power/swap.c
+++ b/kernel/power/swap.c
@@ -454,10 +454,11 @@ static int load_image(struct swap_map_handle *handle,
nr_pages++;
}
} while (ret > 0);
- if (!error)
+ if (!error) {
printk("\b\b\b\bdone\n");
- if (!snapshot_image_loaded(snapshot))
- error = -ENODATA;
+ if (!snapshot_image_loaded(snapshot))
+ error = -ENODATA;
+ }
return error;
}