Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95df812d authored by Hanjun Guo's avatar Hanjun Guo Committed by Rafael J. Wysocki
Browse files

ACPI / table: Replace '1' with specific error return values



After commit 7f8f97c3 (ACPI: acpi_table_parse() now returns
success/fail, not count), acpi_table_parse() returns '1' when it is
unable to find the table, but it should return a negative error code
in that case.  Make it return -ENODEV instead.

Fix the same problem in acpi_table_init() analogously.

Signed-off-by: default avatarHanjun Guo <hanjun.guo@linaro.org>
[rjw: Subject and changelog]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent cad1525a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -306,7 +306,7 @@ int __init acpi_table_parse(char *id, acpi_tbl_table_handler handler)
		early_acpi_os_unmap_memory(table, tbl_size);
		return 0;
	} else
		return 1;
		return -ENODEV;
}

/* 
@@ -351,7 +351,7 @@ int __init acpi_table_init(void)

	status = acpi_initialize_tables(initial_tables, ACPI_MAX_TABLES, 0);
	if (ACPI_FAILURE(status))
		return 1;
		return -EINVAL;

	check_multiple_madt();
	return 0;