[PATCH] platform/x86: hp-bioscfg: Use more common code in hp_init_bios_package_attribute()
Markus Elfring <[email protected]> Thu, 18 Jun 2026 21:54:08 +0200
| Newsgroups | org.kernel.vger.kernel-janitors,org.kernel.vger.linux-kernel,org.kernel.vger.platform-driver-x86 |
|---|---|
| Message-ID | <[email protected]> |
From: Markus Elfring <[email protected]> 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 <[email protected]> --- 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