mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] firmware: coreboot: Fix CFR error-pointer handling warning
@ 2026-10-21  7:57 sean
  2026-10-22  1:44 ` Tzung-Bi Shih
  0 siblings, 1 reply; 2+ messages in thread
From: sean @ 2026-10-21  7:57 UTC (permalink / raw)
  To: Tzung-Bi Shih
  Cc: Brian Norris, Julius Werner, kernel test robot, chrome-platform,
	linux-kernel, oe-kbuild-all

From 4e74bf1ccc0f61b4712f688eab66a7750f693243 Mon Sep 17 00:00:00 2001
From: Sean Rhodes <sean@starlabs.systems>
Date: Wed, 21 Oct 2026 08:55:54 +0100
Subject: [PATCH] firmware: coreboot: Fix CFR error-pointer handling warning

The scoped kfree cleanup already ignores error pointers, so passing the
pointer through no_free_ptr() before PTR_ERR() is unnecessary. It also
makes the IS_ERR/PTR_ERR expressions appear inconsistent to Coccinelle.

Return PTR_ERR() directly. The scoped cleanup still leaves error pointers
untouched while freeing successful allocations on later returns.

Fixes: f2e05ce9763f ("firmware: coreboot: Add CFR firmware attributes driver")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202610210637.LiJ3U0ob-lkp@intel.com/
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
---
 drivers/firmware/coreboot/coreboot-cfr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/coreboot/coreboot-cfr.c
b/drivers/firmware/coreboot/coreboot-cfr.c
index 2d9ea5d213d8..61d5191b5447 100644
--- a/drivers/firmware/coreboot/coreboot-cfr.c
+++ b/drivers/firmware/coreboot/coreboot-cfr.c
@@ -341,7 +341,7 @@ static int coreboot_cfr_read_value(const struct
coreboot_cfr_setting *setting,
 	int ret;

 	if (IS_ERR(efi_name))
-		return PTR_ERR(no_free_ptr(efi_name));
+		return PTR_ERR(efi_name);

 	ret = efivar_lock();
 	if (ret)
-- 
2.53.0

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

* Re: [PATCH] firmware: coreboot: Fix CFR error-pointer handling warning
  2026-10-21  7:57 [PATCH] firmware: coreboot: Fix CFR error-pointer handling warning sean
@ 2026-10-22  1:44 ` Tzung-Bi Shih
  0 siblings, 0 replies; 2+ messages in thread
From: Tzung-Bi Shih @ 2026-10-22  1:44 UTC (permalink / raw)
  To: sean
  Cc: Brian Norris, Julius Werner, kernel test robot, chrome-platform,
	linux-kernel, oe-kbuild-all

On Wed, Oct 21, 2026 at 07:57:49AM +0000, sean@starlabs.systems wrote:
> From 4e74bf1ccc0f61b4712f688eab66a7750f693243 Mon Sep 17 00:00:00 2001
> From: Sean Rhodes <sean@starlabs.systems>
> Date: Wed, 21 Oct 2026 08:55:54 +0100
> Subject: [PATCH] firmware: coreboot: Fix CFR error-pointer handling warning

It looks like the patch is malformed.  I'll remove these when applying it.

> The scoped kfree cleanup already ignores error pointers, so passing the
> pointer through no_free_ptr() before PTR_ERR() is unnecessary. It also
> makes the IS_ERR/PTR_ERR expressions appear inconsistent to Coccinelle.
> 
> Return PTR_ERR() directly. The scoped cleanup still leaves error pointers
> untouched while freeing successful allocations on later returns.
> 
> Fixes: f2e05ce9763f ("firmware: coreboot: Add CFR firmware attributes driver")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202610210637.LiJ3U0ob-lkp@intel.com/
> Signed-off-by: Sean Rhodes <sean@starlabs.systems>

I'll queue this after -rc1 and send it as a fix.  Thanks for the quick
patch.

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

end of thread, other threads:[~2026-10-22  1:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-21  7:57 [PATCH] firmware: coreboot: Fix CFR error-pointer handling warning sean
2026-10-22  1:44 ` Tzung-Bi Shih

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

all inboxes | Powered by JetHome®