[PATCH] platform/x86: hp-bioscfg: Use more common code in hp_init_bios_package_attribute()
From: Markus Elfring
Date: Thu Jun 18 2026 - 15:54:37 EST
From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 18 Jun 2026 21:42:27 +0200
Use an existing label once more so that a bit of common code can be better
reused at the end of this function implementation.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
---
drivers/platform/x86/hp/hp-bioscfg/bioscfg.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c b/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
index 27fd6cd21529..819313a4425a 100644
--- a/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
+++ b/drivers/platform/x86/hp/hp-bioscfg/bioscfg.c
@@ -692,8 +692,7 @@ static int hp_init_bios_package_attribute(enum hp_wmi_data_type attr_type,
if (ret) {
pr_debug("Failed to populate integer package data. Error [0%0x]\n",
ret);
- kfree(str_value);
- return ret;
+ goto pack_attr_exit;
}
if (!str_value || !str_value[0]) {
--
2.54.0