mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04: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 <[email protected]> Acked-by: "Rafael J. Wysocki" <[email protected]> Cc: Pavel Machek <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
9f4fd61fa7
commit
e655a250d5
1 changed files with 4 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue