Skip to content

Commit

Permalink
[PATCH] swswsup: return correct load_image error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Con Kolivas authored and Linus Torvalds committed Mar 26, 2006
1 parent 9f4fd61 commit e655a25
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions kernel/power/swap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit e655a25

Please sign in to comment.