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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user