ACPI / table: remove duplicate NULL check for the handler of acpi_table_parse()
In acpi_table_parse(), pointer of the table to pass to handler() is checked before handler() called, so remove all the duplicate NULL check in the handler function. CC: Tony Luck <tony.luck@intel.com> CC: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
e36f014edf
commit
2fad93083e
@@ -380,9 +380,6 @@ static void __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
|
||||
|
||||
static int __init acpi_parse_madt(struct acpi_table_header *table)
|
||||
{
|
||||
if (!table)
|
||||
return -EINVAL;
|
||||
|
||||
acpi_madt = (struct acpi_table_madt *)table;
|
||||
|
||||
acpi_madt_rev = acpi_madt->header.revision;
|
||||
@@ -645,9 +642,6 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
|
||||
struct acpi_table_header *fadt_header;
|
||||
struct acpi_table_fadt *fadt;
|
||||
|
||||
if (!table)
|
||||
return -EINVAL;
|
||||
|
||||
fadt_header = (struct acpi_table_header *)table;
|
||||
if (fadt_header->revision != 3)
|
||||
return -ENODEV; /* Only deal with ACPI 2.0 FADT */
|
||||
|
Reference in New Issue
Block a user