ACPI, APEI, Fix ERST header length check
authorJiang Liu <liuj97@gmail.com>
Wed, 7 Mar 2012 14:15:06 +0000 (22:15 +0800)
committerLen Brown <len.brown@intel.com>
Fri, 30 Mar 2012 07:30:17 +0000 (03:30 -0400)
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>
drivers/acpi/apei/erst.c

index eb9fab5b96e4d3dca071e11e8dbdec2405b23508..e4d9d24eb73dda047655ac018ed45b6259effedb 100644 (file)
@@ -917,7 +917,7 @@ static int erst_check_table(struct acpi_table_erst *erst_tab)
 {
        if ((erst_tab->header_length !=
             (sizeof(struct acpi_table_erst) - sizeof(erst_tab->header)))
-           && (erst_tab->header_length != sizeof(struct acpi_table_einj)))
+           && (erst_tab->header_length != sizeof(struct acpi_table_erst)))
                return -EINVAL;
        if (erst_tab->header.length < sizeof(struct acpi_table_erst))
                return -EINVAL;