]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/x86: hp-bioscfg: Fix kobject warnings for empty attribute names
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 15 Jan 2026 20:31:10 +0000 (14:31 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Jan 2026 09:27:35 +0000 (10:27 +0100)
commit29917c80aa96a25cbcf5876fd774a1cfd72b01a9
tree2a33cf66ea01c9887f7206ab93d3feaa1e99aee9
parent6484f43740cc969cdac6d922eb69aaf5a19173ee
platform/x86: hp-bioscfg: Fix kobject warnings for empty attribute names

commit fdee1b09721605f532352628d0a24623e7062efb upstream.

The hp-bioscfg driver attempts to register kobjects with empty names when
the HP BIOS returns attributes with empty name strings. This causes
multiple kernel warnings:

  kobject: (00000000135fb5e6): attempted to be registered with empty name!
  WARNING: CPU: 14 PID: 3336 at lib/kobject.c:219 kobject_add_internal+0x2eb/0x310

Add validation in hp_init_bios_buffer_attribute() to check if the
attribute name is empty after parsing it from the WMI buffer. If empty,
log a debug message and skip registration of that attribute, allowing the
module to continue processing other valid attributes.

Cc: stable@vger.kernel.org
Fixes: a34fc329b189 ("platform/x86: hp-bioscfg: bioscfg")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://patch.msgid.link/20260115203725.828434-2-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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/x86/hp/hp-bioscfg/bioscfg.c