
From: Pavel Machek <pavel@ucw.cz>

This prevents oops when not enough memory is available during resume.

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/kernel/power/swsusp.c |    2 ++
 1 files changed, 2 insertions(+)

diff -puN kernel/power/swsusp.c~swsusp-bugfixes-do-not-oops-when-not-enough-memory-during-resume kernel/power/swsusp.c
--- 25/kernel/power/swsusp.c~swsusp-bugfixes-do-not-oops-when-not-enough-memory-during-resume	2004-12-11 22:24:42.578229608 -0800
+++ 25-akpm/kernel/power/swsusp.c	2004-12-11 22:24:42.582229000 -0800
@@ -985,6 +985,8 @@ static int __init swsusp_pagedir_relocat
 		c = *c;
 		free_pages((unsigned long)f, pagedir_order);
 	}
+	if (ret)
+		return ret;
 	printk("|\n");
 	return check_pagedir();
 }
_
