u-boot-2016/common
Paul Burton bd86ef117d image-fit: Fix fit_get_node_from_config semantics
Commit bac17b78da ("image-fit: switch ENOLINK to ENOENT") changed
fit_get_node_from_config to return -ENOENT when a property doesn't
exist, but didn't change any of its callers which check return values.
Notably it didn't change boot_get_ramdisk, which leads to U-Boot failing
to boot FIT images which don't include ramdisks with the following
message:

  Ramdisk image is corrupt or invalid

It also didn't take into account that by returning -ENOENT to denote the
lack of a property we lost the ability to determine from the return
value of fit_get_node_from_config whether it was the property or the
configuration node that was missing, which may potentially lead callers
to accept invalid FIT images.

Fix this by having fit_get_node_from_config return -EINVAL when the
configuration node isn't found and -ENOENT when the property isn't
found, which seems to make semantic sense. Callers that previously
checked for -ENOLINK are adjusted to check for -ENOENT, which fixes the
breakage introduced by commit bac17b78da ("image-fit: switch ENOLINK
to ENOENT").

The only other user of the return fit_get_node_from_config return value,
indirectly, is bootm_find_os which already checked for -ENOENT. From a
read-through of the code I suspect it ought to have been checking for
-ENOLINK prior to bac17b78da ("image-fit: switch ENOLINK to ENOENT")
anyway, which would make it right after this patch, but this would be
good to get verified by someone who knows this x86 code or is able to
test it.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Jonathan Gray <jsg@jsg.id.au>
Cc: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: George McCollister <george.mccollister@gmail.com>
Tested-by: George McCollister <george.mccollister@gmail.com>
2016-09-22 11:34:58 -04:00
..
eeprom
init
spl Kconfig: tpl: Add some TPL support options to Kconfig 2016-09-16 17:03:40 -04:00
autoboot.c
bedbug.c
board_f.c board_f: Add a mach_cpu_init callback 2016-09-21 15:04:04 +02:00
board_info.c
board_r.c
bootm.c cmd: Split 'bootz' and 'booti' out from 'bootm' 2016-08-20 11:35:07 -04:00
bootm_os.c sandbox: Don't exit when bootm completes 2016-07-14 18:22:32 -04:00
bootretry.c
bootstage.c
bouncebuf.c
cli.c
cli_hush.c
cli_readline.c common: cli_readline: Improve command line editing 2016-08-20 14:03:24 -04:00
cli_simple.c
command.c
console.c
cros_ec.c
ddr_spd.c
dlmalloc.c
dlmalloc.src
edid.c
env_attr.c
env_callback.c
env_common.c Various, unrelated tree-wide typo fixes. 2016-07-16 09:43:12 -04:00
env_dataflash.c
env_eeprom.c
env_embedded.c
env_ext4.c
env_fat.c
env_flags.c
env_flash.c
env_mmc.c
env_nand.c common: env_nand: Ensure that we have nand_info[0] prior to use 2016-08-15 18:46:41 -04:00
env_nowhere.c
env_nvram.c
env_onenand.c
env_remote.c
env_sata.c
env_sf.c
env_ubi.c
exports.c
fb_mmc.c
fb_nand.c
fdt_support.c fdt_support: fdt_translate_address() blob const correctness 2016-08-12 09:20:27 -06:00
flash.c
hash.c
hwconfig.c
ide.c
image-android.c
image-fdt.c image-fit: Fix fit_get_node_from_config semantics 2016-09-22 11:34:58 -04:00
image-fit.c image-fit: Fix fit_get_node_from_config semantics 2016-09-22 11:34:58 -04:00
image-sig.c
image-sparse.c
image.c image-fit: Fix fit_get_node_from_config semantics 2016-09-22 11:34:58 -04:00
iomux.c
iotrace.c
kallsyms.c
Kconfig Kconfig: Move config IDENT_STRING to Kconfig 2016-09-20 09:30:23 -04:00
kgdb.c
kgdb_stubs.c
lcd.c
lcd_console.c
lcd_console_rotation.c
lcd_simplefb.c
lynxkdi.c
main.c
Makefile Use separate options for TPL support 2016-09-16 17:03:39 -04:00
malloc_simple.c
memsize.c
menu.c
miiphyutil.c net: mii: check phy advertising register when geting link status 2016-08-22 14:21:23 -05:00
s_record.c
sata.c
scsi.c
splash.c splash: Introduce default_splash_locations 2016-07-26 08:47:37 +02:00
splash_source.c splash: Accommodate DM_USB in splash_init_usb() 2016-07-25 22:42:10 +02:00
stdio.c
system_map.c
update.c
usb.c
usb_hub.c dm: Use dm_scan_fdt_dev() directly where possible 2016-07-27 14:15:54 -06:00
usb_kbd.c
usb_storage.c
xyzModem.c