diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2007-11-14 07:20:48 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@apollo.(none)> | 2007-11-17 10:27:00 -0500 |
commit | 142d0a674d50b53366bd5ea02d7093d04960744e (patch) | |
tree | fa8fcde0201aa0b4b1be952432f1f8f36799ed02 | |
parent | d9f8bcbf67a0ee67c8cb0734f003dfe916bb5248 (diff) |
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: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | include/asm-x86/mach-es7000/mach_mpparse.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/asm-x86/mach-es7000/mach_mpparse.h b/include/asm-x86/mach-es7000/mach_mpparse.h index 8aa10547b4b1..52ee75cd0fe1 100644 --- a/include/asm-x86/mach-es7000/mach_mpparse.h +++ b/include/asm-x86/mach-es7000/mach_mpparse.h | |||
@@ -29,9 +29,9 @@ extern int mps_oem_check(struct mp_config_table *mpc, char *oem, | |||
29 | static inline int es7000_check_dsdt(void) | 29 | static inline int es7000_check_dsdt(void) |
30 | { | 30 | { |
31 | struct acpi_table_header header; | 31 | struct acpi_table_header header; |
32 | memcpy(&header, 0, sizeof(struct acpi_table_header)); | 32 | |
33 | acpi_get_table_header(ACPI_SIG_DSDT, 0, &header); | 33 | if (ACPI_SUCCESS(acpi_get_table_header(ACPI_SIG_DSDT, 0, &header)) && |
34 | if (!strncmp(header.oem_id, "UNISYS", 6)) | 34 | !strncmp(header.oem_id, "UNISYS", 6)) |
35 | return 1; | 35 | return 1; |
36 | return 0; | 36 | return 0; |
37 | } | 37 | } |