mm: memory_hotplug: no need to check res twice in add_memory
authorSasha Levin <sasha.levin@oracle.com>
Sat, 23 Feb 2013 00:32:48 +0000 (16:32 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 24 Feb 2013 01:50:11 +0000 (17:50 -0800)
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>
mm/memory_hotplug.c

index d04ed87bfacbab59953859f9e860acae3f6335ab..302291429953f53f740c89075f5bd54509f8cc1f 100644 (file)
@@ -901,8 +901,7 @@ error:
        /* 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();