aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
authorCon Kolivas <kernel@kolivas.org>2006-03-26 04:37:11 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 11:56:55 -0500
commite655a250d5fc12b6dfe0d436180ba4a3bfffdc9f (patch)
treefc914e0c146f82139ff7e40d30ec642f3663aa2a /kernel/power
parent9f4fd61fa7c13ea905dac18b9baa766a35b88485 (diff)
[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,
454 nr_pages++; 454 nr_pages++;
455 } 455 }
456 } while (ret > 0); 456 } while (ret > 0);
457 if (!error) 457 if (!error) {
458 printk("\b\b\b\bdone\n"); 458 printk("\b\b\b\bdone\n");
459 if (!snapshot_image_loaded(snapshot)) 459 if (!snapshot_image_loaded(snapshot))
460 error = -ENODATA; 460 error = -ENODATA;
461 }
461 return error; 462 return error;
462} 463}
463 464