Commit b1fceac2 authored by Akinobu Mita's avatar Akinobu Mita Committed by Ingo Molnar

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: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent a1a33fa3
...@@ -697,10 +697,6 @@ static int __init acpi_parse_hpet(struct acpi_table_header *table) ...@@ -697,10 +697,6 @@ static int __init acpi_parse_hpet(struct acpi_table_header *table)
#define HPET_RESOURCE_NAME_SIZE 9 #define HPET_RESOURCE_NAME_SIZE 9
hpet_res = alloc_bootmem(sizeof(*hpet_res) + HPET_RESOURCE_NAME_SIZE); hpet_res = alloc_bootmem(sizeof(*hpet_res) + HPET_RESOURCE_NAME_SIZE);
if (!hpet_res)
return 0;
memset(hpet_res, 0, sizeof(*hpet_res));
hpet_res->name = (void *)&hpet_res[1]; hpet_res->name = (void *)&hpet_res[1];
hpet_res->flags = IORESOURCE_MEM; hpet_res->flags = IORESOURCE_MEM;
snprintf((char *)hpet_res->name, HPET_RESOURCE_NAME_SIZE, "HPET %u", snprintf((char *)hpet_res->name, HPET_RESOURCE_NAME_SIZE, "HPET %u",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment