diff options
author | Con Kolivas <kernel@kolivas.org> | 2006-03-26 01:37:11 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-26 08:56:55 -0800 |
commit | e655a250d5fc12b6dfe0d436180ba4a3bfffdc9f (patch) | |
tree | fc914e0c146f82139ff7e40d30ec642f3663aa2a /kernel/power/swap.c | |
parent | 9f4fd61fa7c13ea905dac18b9baa766a35b88485 (diff) | |
download | op-kernel-dev-e655a250d5fc12b6dfe0d436180ba4a3bfffdc9f.zip op-kernel-dev-e655a250d5fc12b6dfe0d436180ba4a3bfffdc9f.tar.gz |
[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/swap.c')
-rw-r--r-- | kernel/power/swap.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/power/swap.c b/kernel/power/swap.c index 9177f3f..044b8e0 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; } |