platform/x86: hp-bioscfg: Skip empty attribute names
Subsystems (2)
PATCH 1/1 platform/x86: hp-bioscfg: Skip empty attribute names
Avoid registering kobjects with empty names when a BIOS attribute name decodes to an empty string.
Fixes a34fc329b1895 ("platform/x86: hp-bioscfg: bioscfg")
Reported-by Alain Cousinie <[email protected]>
Signed-off-by Mario Limonciello <[email protected]>
--- drivers/platform/x86/hp/hp-bioscfg/bioscfg.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/platform/x86/hp/hp-bioscfg/bioscfg.c +5 -0
@@ -696,6 +696,11 @@ static int hp_init_bios_package_attribute(enum hp_wmi_data_type attr_type,return ret; } +if (!str_value || !str_value[0 ]) { +pr_debug ("Ignoring attribute with empty name\n" ); + goto pack_attr_exit; + } +/* All duplicate attributes found are ignored */ duplicate =kset_find_obj (temp_kset, str_value);if (duplicate) {
Signature · 1 line
2.52.0
Ilpo Järvinen
maintainerQuoted 4 lines · Mario Limonciello
Avoid registering kobjects with empty names when a BIOS attribute name decodes to an empty string.
Thank you for your contribution, it has been applied to my local review-ilpo-fixes branch. Note it will show up in the public platform-drivers-x86/review-ilpo-fixes branch only once I've pushed my local branch there, which might take a while.
The list of commits applied:
[1/1] platform/x86: hp-bioscfg: Skip empty attribute names
commit: 6222883af286e2feb3c9ff2bf9fd8fdf4220c55a
--
i.