Commit e655a250 authored by Con Kolivas's avatar Con Kolivas Committed by Linus Torvalds
Browse files

[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: default avatarCon Kolivas <kernel@kolivas.org>
Acked-by: default avatar"Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9f4fd61f
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment