Skip to content

Commit

Permalink
x86: fix bogus memcpy in es7000_check_dsdt()
Browse files Browse the repository at this point in the history
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: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Thomas Gleixner authored and Thomas Gleixner committed Nov 17, 2007
1 parent d9f8bcb commit 142d0a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/asm-x86/mach-es7000/mach_mpparse.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 142d0a6

Please sign in to comment.