From: Jiri Slaby Signed-off-by: Lion Vollnhals Signed-off-by: Jiri Slaby Signed-off-by: Andrew Morton --- drivers/base/memory.c | 5 +---- 1 files changed, 1 insertion(+), 4 deletions(-) diff -puN drivers/base/memory.c~memory-hotplug-move-section_mem_map-alloc-to-sparsec-kzalloc drivers/base/memory.c --- devel/drivers/base/memory.c~memory-hotplug-move-section_mem_map-alloc-to-sparsec-kzalloc 2005-09-12 18:27:01.000000000 -0700 +++ devel-akpm/drivers/base/memory.c 2005-09-12 18:27:01.000000000 -0700 @@ -340,15 +340,12 @@ static int memory_probe_init(void) int add_memory_block(unsigned long node_id, struct mem_section *section, unsigned long state, int phys_device) { - size_t size = sizeof(struct memory_block); - struct memory_block *mem = kmalloc(size, GFP_KERNEL); + struct memory_block *mem = kzalloc(sizeof(*mem), GFP_KERNEL); int ret = 0; if (!mem) return -ENOMEM; - memset(mem, 0, size); - mem->phys_index = __section_nr(section); mem->state = state; init_MUTEX(&mem->state_sem); _