Re: [PATCH v2] of: Put coreboot node after compatibility check
From: Rob Herring (Arm)
Date: Wed Sep 30 2026 - 18:12:06 EST
On Wed, 23 Sep 2026 21:13:50 -0400, Yuho Choi wrote:
> of_find_compatible_node() returns a referenced device node, but
> EXCLUDED_DEFAULT_CELLS_PLATFORMS used the result only as a boolean and
> discarded the reference. This leaked a reference each time the
> address-cells or size-cells warning condition was evaluated on a
> coreboot system.
>
> Use a helper that checks for the coreboot node with a scoped reference,
> so the reference is dropped once the check is done.
>
> Fixes: 8600058ba28a7 ("of: Add coreboot firmware to excluded default cells list")
> Signed-off-by: Yuho Choi <oss.patchbox@xxxxxxxxx>
> ---
> Changes in v2:
> - Use __free(device_node) in of_coreboot_present() (Krzysztof Kozlowski)
> - Switch to my oss.patchbox address
>
> v1: https://lore.kernel.org/all/20260802023821.494178-1-dbgh9129@xxxxxxxxx/
>
> drivers/of/base.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
Applied, thanks!