From: Con Kolivas Date: Sun, 26 Mar 2006 09:37:11 +0000 (-0800) Subject: [PATCH] swswsup: return correct load_image error X-Git-Tag: v2.6.17-rc1~644 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e655a250d5fc12b6dfe0d436180ba4a3bfffdc9f;p=platform%2Fupstream%2Fkernel-adaptation-pc.git [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 Acked-by: "Rafael J. Wysocki" Cc: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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; }