From: Sasha Levin Date: Sat, 23 Feb 2013 00:32:48 +0000 (-0800) Subject: mm: memory_hotplug: no need to check res twice in add_memory X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a864b9d06c71456470b3544fe4cc07bcdd29828d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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 Signed-off-by: Linus Torvalds --- 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();