Commit 2a324ce7b79a3a90cc2d4ade5d5f960a99000caa
Exists in
master
and in
39 other branches
Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6: PM / Hibernate: Return error code when alloc_image_page() fails
Showing 1 changed file Side-by-side Diff
kernel/power/snapshot.c
... | ... | @@ -1519,11 +1519,8 @@ |
1519 | 1519 | swsusp_alloc(struct memory_bitmap *orig_bm, struct memory_bitmap *copy_bm, |
1520 | 1520 | unsigned int nr_pages, unsigned int nr_highmem) |
1521 | 1521 | { |
1522 | - int error = 0; | |
1523 | - | |
1524 | 1522 | if (nr_highmem > 0) { |
1525 | - error = get_highmem_buffer(PG_ANY); | |
1526 | - if (error) | |
1523 | + if (get_highmem_buffer(PG_ANY)) | |
1527 | 1524 | goto err_out; |
1528 | 1525 | if (nr_highmem > alloc_highmem) { |
1529 | 1526 | nr_highmem -= alloc_highmem; |
... | ... | @@ -1546,7 +1543,7 @@ |
1546 | 1543 | |
1547 | 1544 | err_out: |
1548 | 1545 | swsusp_free(); |
1549 | - return error; | |
1546 | + return -ENOMEM; | |
1550 | 1547 | } |
1551 | 1548 | |
1552 | 1549 | asmlinkage int swsusp_save(void) |