tools: mkimage: propagate error codes from fit_handle_file()
authorAristo Chen <jj251510319013@gmail.com>
Tue, 10 Jun 2025 07:41:17 +0000 (07:41 +0000)
committerTom Rini <trini@konsulko.com>
Thu, 26 Jun 2025 14:12:54 +0000 (08:12 -0600)
commit21705d39144a51a50c0206c74588c6e9e4018e7a
tree770fdca091e99aa3e0c7000c67a861c6721d9caf
parentdf8dbc87a2570e99ba73d8e0a097797126040568
tools: mkimage: propagate error codes from fit_handle_file()

The fit_handle_file() function previously returned a hardcoded -1 on
error. This change updates the logic to return the actual error code
stored in `ret`, allowing for error propagation.

This improves debuggability and enables downstream callers to
distinguish different failure causes, such as FDT_ERR_NOTFOUND or
other errors.

Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
tools/fit_image.c