diff options
author | Jorge Lopez <[email protected]> | 2023-07-31 15:31:37 -0500 |
---|---|---|
committer | Hans de Goede <[email protected]> | 2023-08-07 13:34:46 +0200 |
commit | 08f1f212576c882e6584573f735aee28faaf7c78 (patch) | |
tree | 12560e377a99e953155c95315fea8c1190f7ed32 /drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c | |
parent | a585400b36306cbd88016fb5215711e6a8f73d83 (diff) |
platform/x86: hp-bioscfg: Change how prerequisites size is evaluated
Update steps taken to evaluate prerequisites size value
Signed-off-by: Jorge Lopez <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Hans de Goede <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Diffstat (limited to 'drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c')
-rw-r--r-- | drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c b/drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c index 50855ff48926..89bb039a8a3c 100644 --- a/drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c +++ b/drivers/platform/x86/hp/hp-bioscfg/enum-attributes.c @@ -190,9 +190,11 @@ static int hp_populate_enumeration_elements_from_package(union acpi_object *enum enum_data->common.sequence = int_value; break; case PREREQUISITES_SIZE: - enum_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; + } + enum_data->common.prerequisites_size = int_value; /* * This step is needed to keep the expected |