Commit a864b9d06c71456470b3544fe4cc07bcdd29828d

Authored by Sasha Levin
Committed by Linus Torvalds
1 parent 41badc15cb

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>

Showing 1 changed file with 1 additions and 2 deletions Side-by-side Diff

... ... @@ -901,8 +901,7 @@
901 901 /* rollback pgdat allocation and others */
902 902 if (new_pgdat)
903 903 rollback_node_hotadd(nid, pgdat);
904   - if (res)
905   - release_memory_resource(res);
  904 + release_memory_resource(res);
906 905  
907 906 out:
908 907 unlock_memory_hotplug();