dm: core: ofnode: safely fallback in ofnode_lookup_fdt
Under some conditions it's possible to hit the null condition here like
when running with OF_LIVE and using the ofnode API before
initr_of_live() is called. There is very little null
checking for this in the FDT framework, so returning null here can
result in weird null pointer conditions.
Instead let's return the control FDT in the fallback case, this is
usually what the user was expecting.
Signed-off-by:
Caleb Connolly <caleb.connolly@linaro.org>
Loading
Please register or sign in to comment