Re: [PATCH v4 4/6] of/overlay: return ERR_PTR from dup_and_fixup_symbol_prop()

From: Abdurrahman Hussain

Date: Wed Jul 22 2026 - 15:10:02 EST


On Wed Jul 22, 2026 at 12:36 AM PDT, Krzysztof Kozlowski wrote:
> Again, AI written.

As in 1/6 -- disclosed in the trailer, and I'll trim the prose in the
reroll.

> > Return ERR_PTR instead: -EINVAL for malformed values, -ENODEV when
>
> Why?

The /aliases caller added in the next patch has to handle the three
failures differently: a value that doesn't resolve inside the overlay
is a legacy alias and is copied verbatim; a malformed value is copied
with a warning rather than failing an overlay that applied fine
before this series; only allocation failure fails the apply. A bare
NULL can't carry that distinction, and the existing caller reports
every NULL as -ENOMEM, so a structural problem in /__symbols__ gets
diagnosed as memory exhaustion.

If you'd rather see an int return with the property as an out
parameter instead of ERR_PTR, I can reroll it that way.

Thanks,
Abdurrahman