mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 16:20:55 +07:00
mm: memory_hotplug: no need to check res twice in add_memory
Remove one redundant check of res. Signed-off-by: Sasha Levin <sasha.levin@oracle.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
41badc15cb
commit
a864b9d06c
@ -901,8 +901,7 @@ int __ref add_memory(int nid, u64 start, u64 size)
|
|||||||
/* rollback pgdat allocation and others */
|
/* rollback pgdat allocation and others */
|
||||||
if (new_pgdat)
|
if (new_pgdat)
|
||||||
rollback_node_hotadd(nid, pgdat);
|
rollback_node_hotadd(nid, pgdat);
|
||||||
if (res)
|
release_memory_resource(res);
|
||||||
release_memory_resource(res);
|
|
||||||
|
|
||||||
out:
|
out:
|
||||||
unlock_memory_hotplug();
|
unlock_memory_hotplug();
|
||||||
|
Loading…
Reference in New Issue
Block a user