]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm: memory_hotplug: no need to check res twice in add_memory
authorSasha Levin <sasha.levin@oracle.com>
Wed, 20 Feb 2013 02:14:09 +0000 (13:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:26 +0000 (16:52 +1100)
Remove one redundant check of res.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Andrew Morton <akpm@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();