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)
commit2dfcd2527de86ee5b5c8ccf559422cb891eae552
treedf20fb290a597d076db86b78cc1931838aba3d0b
parenteb33bab17345687f0bf46605a7f017021ba57972
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