Re: [PATCH] firmware: coreboot: Fix CFR error-pointer handling warning
From: Tzung-Bi Shih
Date: Wed Oct 21 2026 - 21:44:14 EST
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@xxxxxxxxx>
> Closes: https://lore.kernel.org/oe-kbuild-all/202610210637.LiJ3U0ob-lkp@xxxxxxxxx/
> 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.