提交 142d0a67 编写于 作者: T Thomas Gleixner 提交者: Thomas Gleixner

x86: fix bogus memcpy in es7000_check_dsdt()

es7000_check_dst() contains a memcpy from 0, which probably should have been
a memset. Remove it and check the retunr value from acpi_get_table_header.

Noticed by: Joe Perches <joe@perches.com>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 d9f8bcbf
......@@ -29,9 +29,9 @@ extern int mps_oem_check(struct mp_config_table *mpc, char *oem,
static inline int es7000_check_dsdt(void)
{
struct acpi_table_header header;
memcpy(&header, 0, sizeof(struct acpi_table_header));
acpi_get_table_header(ACPI_SIG_DSDT, 0, &header);
if (!strncmp(header.oem_id, "UNISYS", 6))
if (ACPI_SUCCESS(acpi_get_table_header(ACPI_SIG_DSDT, 0, &header)) &&
!strncmp(header.oem_id, "UNISYS", 6))
return 1;
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册