Skip to content

Commit

Permalink
mm: memory_hotplug: no need to check res twice in add_memory
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sasha Levin authored and Linus Torvalds committed Feb 24, 2013
1 parent 41badc1 commit a864b9d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mm/memory_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit a864b9d

Please sign in to comment.