[PATCH 1/3] dm: core: Check ofnode_to_offset() return value

Marek Vasut marek.vasut at mailbox.org
Sun Nov 16 01:16:53 CET 2025


On 11/14/25 3:36 PM, Tom Rini wrote:

Hello Tom,

>> We would need a wrapper for almost every libfdt call, which isn't really
>> better.
>>
>>> What does fdt_getprop() return when the offset is -1 ?
>> If can_assume(VALID_DTB) , then crash on NULL pointer dereference .
>> If not, I think FDT_END (premature end) or an error code.
> 
> How are we now getting in this state is a question. Are we being passed
> an unaligned DT and trying to work around/with it?
This is superseded by:

[PATCH] xtensa: Assure end of U-Boot is at 8-byte aligned offset

It turns out the problem was yet another unaligned appended DT, on 
xtensa this time.


More information about the U-Boot mailing list