Hi Tom, On Monday, 16 February 2026 18:50:20 CET Tom Rini wrote: > On Tue, Feb 10, 2026 at 05:29:01PM +0100, Romain Gantois wrote: > > The ofnode_to_fdt() function may return a NULL pointer in multiple cases. > > Or, this function's return value is often passed directly to functions > > such > > as fdt_getprop() which end up dereferencing it, thus causing a NULL > > pointer > > exception. > > > > Don't allow ofnode_to_fdt() to return NULL, to avoid a NULL pointer > > dereference. > > > > Signed-off-by: Romain Gantois <[email protected]> > > This leads to failures to build such as: > +(neu6a-io-rk3588) drivers/core/ofnode.c: In function 'ofnode_to_fdt': > +(neu6a-io-rk3588) drivers/core/ofnode.c:176:21: error: assignment discards > 'const' qualifie from pointer target type [-Werror=discarded-qualifiers] > +(neu6a-io-rk3588) 176 | fdt = gd->fdt_blob; > +(neu6a-io-rk3588) | ^ > +(neu6a-io-rk3588) cc1: all warnings being treated as errors
Indeed, looks like the dropped (void *) cast is responsible for that. Thanks, -- Romain Gantois, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
signature.asc
Description: This is a digitally signed message part.

