PM / Hibernate: Return error code when alloc_image_page() fails
commitf153f5f88f2a1e5ad38a328b144bd3a5b1f5dca3
authorStanislaw Gruszka <stf_xl@pop3.wp.pl>
Sat, 12 Feb 2011 20:06:51 +0000 (12 21:06 +0100)
committerAK <andi@firstfloor.org>
Thu, 31 Mar 2011 18:58:07 +0000 (31 11:58 -0700)
treebeb75b999b336ac0e389b413eea20494ef7954c0
parent6736d3bbb4c33f0e99cfdbfb74cbefeda7048c17
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>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
kernel/power/snapshot.c