PM / Hibernate: Return error code when alloc_image_page() fails
authorStanislaw Gruszka <stf_xl@pop3.wp.pl>
Sat, 12 Feb 2011 20:06:51 +0000 (21:06 +0100)
committerRafael J. Wysocki <rjw@sisk.pl>
Wed, 16 Feb 2011 20:53:52 +0000 (21:53 +0100)
commit2e725a065b0153f0c449318da1923a120477633d
treedf20fb290a597d076db86b78cc1931838aba3d0b
parenta2640111d5edb3f4e6dd6089c0dbddc7590110b4
PM / Hibernate: Return error code when alloc_image_page() fails

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>
Cc: stable@kernel.org
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
kernel/power/snapshot.c