PM / Suspend: Fix ordering of calls in suspend error paths
authorRafael J. Wysocki <rjw@sisk.pl>
Wed, 7 Jul 2010 21:43:45 +0000 (23:43 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Mon, 19 Jul 2010 00:00:35 +0000 (02:00 +0200)
commitce4410116c5debfb0e049f5db4b5cd6211e05b80
tree510009c78c5d2757fde08f31c03dd41ddb130463
parentd074ee023fa3a4681b64223c5e636102c39628c4
PM / Suspend: Fix ordering of calls in suspend error paths

The ACPI suspend code calls suspend_nvs_free() at a wrong place,
which may lead to a memory leak if there's an error executing
acpi_pm_prepare(), because acpi_pm_finish() will not be called in
that case.  However, the root cause of this problem is the
apparently confusing ordering of calls in suspend error paths that
needs to be fixed.

In addition to that, fix a typo in a label name in suspend.c.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Len Brown <len.brown@intel.com>
include/linux/suspend.h
kernel/power/suspend.c