diff options
author | Dou Liyang <douly.fnst@cn.fujitsu.com> | 2018-08-23 22:51:26 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-10-04 02:58:32 -0400 |
commit | d0381bf4f80c571dde1244fe5b85dc35e8b3f546 (patch) | |
tree | 72cb78100c435e226eca530e31294f1a6de52b30 /drivers/acpi/acpi_processor.c | |
parent | 17b57b1883c1285f3d0dc2266e8f79286a7bef38 (diff) |
ACPI / processor: Fix the return value of acpi_processor_ids_walk()
ACPI driver should make sure all the processor IDs in their ACPI Namespace
are unique. the driver performs a depth-first walk of the namespace tree
and calls the acpi_processor_ids_walk() to check the duplicate IDs.
But, the acpi_processor_ids_walk() mistakes the return value. If a
processor is checked, it returns true which causes the walk break
immediately, and other processors will never be checked.
Repace the value with AE_OK which is the standard acpi_status value.
And don't abort the namespace walk even on error.
Fixes: 8c8cb30f49b8 (acpi/processor: Implement DEVICE operator for processor enumeration)
Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpi_processor.c')
-rw-r--r-- | drivers/acpi/acpi_processor.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index 449d86d39965..fc447410ae4d 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c | |||
@@ -643,7 +643,7 @@ static acpi_status __init acpi_processor_ids_walk(acpi_handle handle, | |||
643 | 643 | ||
644 | status = acpi_get_type(handle, &acpi_type); | 644 | status = acpi_get_type(handle, &acpi_type); |
645 | if (ACPI_FAILURE(status)) | 645 | if (ACPI_FAILURE(status)) |
646 | return false; | 646 | return status; |
647 | 647 | ||
648 | switch (acpi_type) { | 648 | switch (acpi_type) { |
649 | case ACPI_TYPE_PROCESSOR: | 649 | case ACPI_TYPE_PROCESSOR: |
@@ -663,11 +663,12 @@ static acpi_status __init acpi_processor_ids_walk(acpi_handle handle, | |||
663 | } | 663 | } |
664 | 664 | ||
665 | processor_validated_ids_update(uid); | 665 | processor_validated_ids_update(uid); |
666 | return true; | 666 | return AE_OK; |
667 | 667 | ||
668 | err: | 668 | err: |
669 | /* Exit on error, but don't abort the namespace walk */ | ||
669 | acpi_handle_info(handle, "Invalid processor object\n"); | 670 | acpi_handle_info(handle, "Invalid processor object\n"); |
670 | return false; | 671 | return AE_OK; |
671 | 672 | ||
672 | } | 673 | } |
673 | 674 | ||