diff options
author | Jiang Liu <liuj97@gmail.com> | 2012-03-07 09:15:06 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-03-30 03:30:17 -0400 |
commit | 7ed28f2ed43ece424ff2fa4dedac7928bb37a23a (patch) | |
tree | 89228bebc7aa109829c14d78f91aae1218087adb /drivers/acpi/apei | |
parent | c16fa4f2ad19908a47c63d8fa436a1178438c7e7 (diff) |
ACPI, APEI, Fix ERST header length check
This fixes a trivial copy & paste error in ERST header length check.
It's just for future safety because sizeof(struct acpi_table_einj)
equals to sizeof(struct acpi_table_erst) with current ACPI5.0
specification. It applies to v3.3-rc6.
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Acked-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/apei')
-rw-r--r-- | drivers/acpi/apei/erst.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c index eb9fab5b96e4..e4d9d24eb73d 100644 --- a/drivers/acpi/apei/erst.c +++ b/drivers/acpi/apei/erst.c | |||
@@ -917,7 +917,7 @@ static int erst_check_table(struct acpi_table_erst *erst_tab) | |||
917 | { | 917 | { |
918 | if ((erst_tab->header_length != | 918 | if ((erst_tab->header_length != |
919 | (sizeof(struct acpi_table_erst) - sizeof(erst_tab->header))) | 919 | (sizeof(struct acpi_table_erst) - sizeof(erst_tab->header))) |
920 | && (erst_tab->header_length != sizeof(struct acpi_table_einj))) | 920 | && (erst_tab->header_length != sizeof(struct acpi_table_erst))) |
921 | return -EINVAL; | 921 | return -EINVAL; |
922 | if (erst_tab->header.length < sizeof(struct acpi_table_erst)) | 922 | if (erst_tab->header.length < sizeof(struct acpi_table_erst)) |
923 | return -EINVAL; | 923 | return -EINVAL; |