boot: Update boot_get_fdt() return arguments

If an error is returned, leave the return arguments alone. There is no
point in setting them to zero, since the caller already knows (from the
error code) that they are not being returned.

This makes things simpler for callers which have an existing devicetree.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-07-25 10:26:43 -07:00
parent c1264fdf09
commit b0eb6cb6fc
2 changed files with 2 additions and 5 deletions

View File

@@ -444,9 +444,6 @@ int boot_get_fdt(void *buf, const char *select, uint arch,
char *fdt_blob = NULL;
ulong fdt_addr;
*startp = NULL;
*sizep = 0;
if (select || genimg_has_config(images)) {
int ret;

View File

@@ -895,8 +895,8 @@ int fit_get_node_from_config(struct bootm_headers *images,
* @select: FDT to select (this is normally argv[2] of the bootm command)
* @arch: architecture (IH_ARCH_...)
* @images: pointer to the bootm images structure
* @startp: returns the fdt start address, if 0 if none
* @sizep: returns the fdt length, or 0 if none
* @startp: returns the fdt start address, on success
* @sizep: returns the fdt length, on success
*
* Return: 0 if fdt image was found and valid, or skipped;
* 1, if fdt image is found but corrupted