From: Sasha Levin Date: Wed, 20 Feb 2013 02:14:09 +0000 (+1100) Subject: mm: memory_hotplug: no need to check res twice in add_memory X-Git-Tag: next-20130220~1^2~559 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=edb3916ebe577e3bb0ddb21700acf5be8e912ff2;p=karo-tx-linux.git mm: memory_hotplug: no need to check res twice in add_memory Remove one redundant check of res. Signed-off-by: Sasha Levin Signed-off-by: Andrew Morton --- 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: /* 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();