summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorWen Congyang <wency@cn.fujitsu.com>2012-07-11 14:02:31 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-11 16:04:46 -0700
commit41b9e2d7ec3f618fd076cb3466edd0a8ebabae5a (patch)
tree5f4a6d9062f096cbbe839f5dbe14638c6e2816ff /mm
parent213ab3f9fcfc1ba471906a4f2c24d7b21370c859 (diff)
downloadtalos-op-linux-41b9e2d7ec3f618fd076cb3466edd0a8ebabae5a.tar.gz
talos-op-linux-41b9e2d7ec3f618fd076cb3466edd0a8ebabae5a.zip
mm/memory_hotplug.c: release memory resources if hotadd_new_pgdat() fails
We should goto error to release memory resource if hotadd_new_pgdat() failed. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Cc: Yasuaki ISIMATU <isimatu.yasuaki@jp.fujitsu.com> Acked-by: David Rientjes <rientjes@google.com> Cc: Len Brown <lenb@kernel.org> Cc: "Brown, Len" <len.brown@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/memory_hotplug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 0d7e3ec8e0f3..427bb291dd0f 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -618,7 +618,7 @@ int __ref add_memory(int nid, u64 start, u64 size)
pgdat = hotadd_new_pgdat(nid, start);
ret = -ENOMEM;
if (!pgdat)
- goto out;
+ goto error;
new_pgdat = 1;
}
OpenPOWER on IntegriCloud