aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2008-04-19 10:55:14 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-26 11:35:47 -0400
commitb1fceac2b9e04d278316b2faddf276015fc06e3b (patch)
tree2dae7248c29ed2f5480baa5cc8d1c18911573bbd /arch
parenta1a33fa315b8a5a390f1132681485209500ff5b5 (diff)
x86: remove unnecessary memset and NULL check after alloc_bootmem()
memset and NULL check after alloc_bootmem() are unnecessary. Because it returns zeroed memory and it never return NULL. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/acpi/boot.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 057ccf1d5ad4..977ed5cdeaa3 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -697,10 +697,6 @@ static int __init acpi_parse_hpet(struct acpi_table_header *table)
697#define HPET_RESOURCE_NAME_SIZE 9 697#define HPET_RESOURCE_NAME_SIZE 9
698 hpet_res = alloc_bootmem(sizeof(*hpet_res) + HPET_RESOURCE_NAME_SIZE); 698 hpet_res = alloc_bootmem(sizeof(*hpet_res) + HPET_RESOURCE_NAME_SIZE);
699 699
700 if (!hpet_res)
701 return 0;
702
703 memset(hpet_res, 0, sizeof(*hpet_res));
704 hpet_res->name = (void *)&hpet_res[1]; 700 hpet_res->name = (void *)&hpet_res[1];
705 hpet_res->flags = IORESOURCE_MEM; 701 hpet_res->flags = IORESOURCE_MEM;
706 snprintf((char *)hpet_res->name, HPET_RESOURCE_NAME_SIZE, "HPET %u", 702 snprintf((char *)hpet_res->name, HPET_RESOURCE_NAME_SIZE, "HPET %u",