2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-19 08:05:27 +08:00

[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>
This commit is contained in:
Con Kolivas 2006-03-26 01:37:11 -08:00 committed by Linus Torvalds
parent 9f4fd61fa7
commit e655a250d5

View File

@ -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;
}