Commit a864b9d0 authored by Sasha Levin's avatar Sasha Levin Committed by Linus Torvalds

mm: memory_hotplug: no need to check res twice in add_memory

Remove one redundant check of res.
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 41badc15
......@@ -901,8 +901,7 @@ int __ref add_memory(int nid, u64 start, u64 size)
/* rollback pgdat allocation and others */
if (new_pgdat)
rollback_node_hotadd(nid, pgdat);
if (res)
release_memory_resource(res);
release_memory_resource(res);
out:
unlock_memory_hotplug();
......
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