diff options
| author | Simon Glass <[email protected]> | 2025-03-05 17:25:13 -0700 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-03-18 13:12:15 -0600 |
| commit | feb8d7fd749413e889ba2c396654f473ba32034d (patch) | |
| tree | 7c101ad7bffe90b2430ca76effe24cb55fae9035 /boot | |
| parent | b13408021d361fbae1c254307f139ad1e6def3d2 (diff) | |
pxe_utils: Simplify default fdt in label_run_boot()
Tidy up this code a little to avoid two calls to env_get() for both
fdt_addr and fdtcontroladdr
Signed-off-by: Simon Glass <[email protected]>
Suggested-by: Quentin Schulz <[email protected]>
Diffstat (limited to 'boot')
| -rw-r--r-- | boot/pxe_utils.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c index bbb6ff203b6..37306f37009 100644 --- a/boot/pxe_utils.c +++ b/boot/pxe_utils.c @@ -612,24 +612,18 @@ static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label, } if (!bmi.conf_fdt) { - if (IS_ENABLED(CONFIG_SUPPORT_PASSING_ATAGS)) { - if (strcmp("-", label->fdt)) - bmi.conf_fdt = env_get("fdt_addr"); - } else { + if (!IS_ENABLED(CONFIG_SUPPORT_PASSING_ATAGS) || + strcmp("-", label->fdt)) bmi.conf_fdt = env_get("fdt_addr"); - } } kernel_addr_r = genimg_get_kernel_addr(kernel_addr); buf = map_sysmem(kernel_addr_r, 0); if (!bmi.conf_fdt && genimg_get_format(buf) != IMAGE_FORMAT_FIT) { - if (IS_ENABLED(CONFIG_SUPPORT_PASSING_ATAGS)) { - if (strcmp("-", label->fdt)) - bmi.conf_fdt = env_get("fdtcontroladdr"); - } else { + if (!IS_ENABLED(CONFIG_SUPPORT_PASSING_ATAGS) || + strcmp("-", label->fdt)) bmi.conf_fdt = env_get("fdtcontroladdr"); - } } /* Try bootm for legacy and FIT format image */ |
