Commit 42efc9e6 authored by Jorge Lopez's avatar Jorge Lopez Committed by Hans de Goede

platform/x86: hp-bioscfg: Change how enum possible values size is evaluated

Updates steps how enum possible values size is evaluated
Signed-off-by: default avatarJorge Lopez <jorge.lopez2@hp.com>
Link: https://lore.kernel.org/r/20230731203141.30044-7-jorge.lopez2@hp.comReviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 24652a8c
......@@ -240,9 +240,11 @@ static int hp_populate_enumeration_elements_from_package(union acpi_object *enum
str_value, sizeof(enum_data->current_value));
break;
case ENUM_SIZE:
enum_data->possible_values_size = int_value;
if (int_value > MAX_VALUES_SIZE)
if (int_value > MAX_VALUES_SIZE) {
pr_warn("Possible number values size value exceeded the maximum number of elements supported or data may be malformed\n");
int_value = MAX_VALUES_SIZE;
}
enum_data->possible_values_size = int_value;
/*
* This step is needed to keep the expected
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment