diff options
Diffstat (limited to 'drivers/platform/x86/hp/hp-bioscfg/order-list-attributes.c')
-rw-r--r-- | drivers/platform/x86/hp/hp-bioscfg/order-list-attributes.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/platform/x86/hp/hp-bioscfg/order-list-attributes.c b/drivers/platform/x86/hp/hp-bioscfg/order-list-attributes.c index aba7d26b54b2..71f588cbdf88 100644 --- a/drivers/platform/x86/hp/hp-bioscfg/order-list-attributes.c +++ b/drivers/platform/x86/hp/hp-bioscfg/order-list-attributes.c @@ -202,9 +202,11 @@ static int hp_populate_ordered_list_elements_from_package(union acpi_object *ord ordered_list_data->common.sequence = int_value; break; case PREREQUISITES_SIZE: - ordered_list_data->common.prerequisites_size = int_value; - if (int_value > MAX_PREREQUISITES_SIZE) + if (int_value > MAX_PREREQUISITES_SIZE) { pr_warn("Prerequisites size value exceeded the maximum number of elements supported or data may be malformed\n"); + int_value = MAX_PREREQUISITES_SIZE; + } + ordered_list_data->common.prerequisites_size = int_value; /* * This step is needed to keep the expected |