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>
This commit is contained in:
parent
213ab3f9fc
commit
41b9e2d7ec
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue