The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] platform/x86: hp-bioscfg: Use more common code in hp_init_bios_package_attribute()
@ 2026-06-18 19:54 Markus Elfring
  2026-07-01 11:53 ` Ilpo Järvinen
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Elfring @ 2026-06-18 19:54 UTC (permalink / raw)
  To: platform-driver-x86, Hans de Goede, Ilpo Järvinen,
	Jorge Lopez
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
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@users.sourceforge.net>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-07-03 10:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-18 19:54 [PATCH] platform/x86: hp-bioscfg: Use more common code in hp_init_bios_package_attribute() Markus Elfring
2026-07-01 11:53 ` Ilpo Järvinen
2026-07-01 17:53   ` Markus Elfring
2026-07-03 10:32     ` Ilpo Järvinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox