[PATCH] mm: memory_hotplug: no need to check res twice in add_memory
From: Sasha Levin
Date: Thu Dec 20 2012 - 14:17:50 EST
Remove one redundant check of res.
Signed-off-by: Sasha Levin <sasha.levin@xxxxxxxxxx>
---
mm/memory_hotplug.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 962e353..4082244 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -898,8 +898,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();
--
1.8.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/