On 2026-05-08T21:31:58, Aristo Chen <[email protected]> wrote: > boot/fit: read default-config property from the configurations node > > In fit_print_contents() the default configuration's unit name is read by > calling fdt_getprop() with noffset rather than confs_noffset. Today this > happens to work by coincidence: the preceding loop walks /images using > fdt_next_node(), and when iteration leaves the subtree libfdt returns > the offset of the next sibling in DFS order, which by FIT layout > convention is /configurations. The depth counter then drops below zero > and the loop exits with noffset still pointing at /configurations. > > This relies on /images and /configurations being adjacent siblings and > on the implementation detail of fdt_next_node()'s post-exhaustion > return value. It also blocks a follow-up conversion to > fdt_for_each_subnode(), whose post-loop loop variable is a negative > error code rather than a valid offset. > > Use confs_noffset directly, which the comment immediately above the > call already names as the source. > > Signed-off-by: Aristo Chen <[email protected]> > > boot/image-fit.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass <[email protected]>

