Commit 41b9e2d7 authored by Wen Congyang's avatar Wen Congyang Committed by Linus Torvalds

mm/memory_hotplug.c: release memory resources if hotadd_new_pgdat() fails

We should goto error to release memory resource if hotadd_new_pgdat()
Signed-off-by: default avatarWen Congyang <>
Cc: Yasuaki ISIMATU <>
Acked-by: default avatarDavid Rientjes <>
Cc: Len Brown <>
Cc: "Brown, Len" <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 213ab3f9
......@@ -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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment