PM / Hibernate: Return error code when alloc_image_page() fails
commit92a79fb1843f5af48a7d80efde9852450e2ecc5f
authorStanislaw Gruszka <stf_xl@pop3.wp.pl>
Sat, 12 Feb 2011 20:06:51 +0000 (12 21:06 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Mar 2011 19:45:10 +0000 (21 12:45 -0700)
tree56f06a2e660aba2ddf74dbc28d3f8ff954f06525
parent3393d8f7f8282ec1a154b8df502d7f0ca142ba31
PM / Hibernate: Return error code when alloc_image_page() fails

commit 2e725a065b0153f0c449318da1923a120477633d upstream.

Currently we return 0 in swsusp_alloc() when alloc_image_page() fails.
Fix that.  Also remove unneeded "error" variable since the only
useful value of error is -ENOMEM.

[rjw: Fixed up the changelog and changed subject.]

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/power/snapshot.c