Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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: default avatarWen Congyang <wency@cn.fujitsu.com>
Cc: Yasuaki ISIMATU <isimatu.yasuaki@jp.fujitsu.com>
Acked-by: default avatarDavid Rientjes <rientjes@google.com>
Cc: Len Brown <lenb@kernel.org>
Cc: "Brown, Len" <len.brown@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 213ab3f9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}