Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <alain.cousinie@laposte.net>
Closes: https://lore.kernel.org/platform-driver-x86/22ed5f78-c8bf-4ab4-8c38-420cc0201e7e@laposte.net/
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://patch.msgid.link/20260128190501.2170068-1-mario.limonciello@amd.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

authored by

Mario Limonciello and committed by
Ilpo Järvinen
6222883a fe747d71

+5
+5
drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
··· 696 696 return ret; 697 697 } 698 698 699 + if (!str_value || !str_value[0]) { 700 + pr_debug("Ignoring attribute with empty name\n"); 701 + goto pack_attr_exit; 702 + } 703 + 699 704 /* All duplicate attributes found are ignored */ 700 705 duplicate = kset_find_obj(temp_kset, str_value); 701 706 if (duplicate) {