diff options
author | Sasha Levin <sasha.levin@oracle.com> | 2013-02-22 19:32:48 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-23 20:50:11 -0500 |
commit | a864b9d06c71456470b3544fe4cc07bcdd29828d (patch) | |
tree | dc0b982d118f20289b567aa5647df7320b597aa3 /mm | |
parent | 41badc15cbad0350de34408c1b0c690f9df76d4b (diff) |
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>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory_hotplug.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index d04ed87bfacb..302291429953 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c | |||
@@ -901,8 +901,7 @@ error: | |||
901 | /* rollback pgdat allocation and others */ | 901 | /* rollback pgdat allocation and others */ |
902 | if (new_pgdat) | 902 | if (new_pgdat) |
903 | rollback_node_hotadd(nid, pgdat); | 903 | rollback_node_hotadd(nid, pgdat); |
904 | if (res) | 904 | release_memory_resource(res); |
905 | release_memory_resource(res); | ||
906 | 905 | ||
907 | out: | 906 | out: |
908 | unlock_memory_hotplug(); | 907 | unlock_memory_hotplug(); |