On 2026-09-01T10:20:35, Naveen Kumar Chaudhary <[email protected]> wrote: > board_f: fix use of uninitialized variable in initf_upl() > > If the malloc() for the UPL handoff structure failed, ret was checked > while still uninitialized, leading to undefined behavior: either a bogus > error code was returned or, if ret happened to be zero, gd_set_upl() was > called with a NULL pointer. Bail out with -ENOMEM on allocation failure > and only read ret after upl_read_handoff() has set it. > > Fixes: 0fc406ab20e ("upl: Plumb in universal payload to the init process") > Signed-off-by: Naveen Kumar Chaudhary <[email protected]> > > common/board_f.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-)
Reviewed-by: Simon Glass <[email protected]>
