diff options
author | Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | 2017-08-05 05:47:02 +0900 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-08-13 15:17:34 -0400 |
commit | 160cfc4b5a6f761d07ade25472ab1d8408100d1a (patch) | |
tree | 04f7157cc4d23c45d985f3ba4efd92e1d6d3292c /common/boot_fit.c | |
parent | 7088a365987d12a461c6d048e8ce9fa1afcb298d (diff) | |
download | u-boot-160cfc4b5a6f761d07ade25472ab1d8408100d1a.zip u-boot-160cfc4b5a6f761d07ade25472ab1d8408100d1a.tar.gz u-boot-160cfc4b5a6f761d07ade25472ab1d8408100d1a.tar.bz2 |
boot_fit: Change return value from FDT_ERROR to -EINVAL in fdt_offset()
FDT_ERROR is defined as unsigned long. However, since the return value of
fdt_offset() is int, a warning will occur when compiling. Also, it is better
to use -EINVAL than FDT_ERROR.
This fixes this problem by change return value from FDT_ERROR to -EINVAL.
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
CC: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Franklin S Cooper Jr <fcooper@ti.com>
Diffstat (limited to 'common/boot_fit.c')
-rw-r--r-- | common/boot_fit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/boot_fit.c b/common/boot_fit.c index 51440a6..0a72315 100644 --- a/common/boot_fit.c +++ b/common/boot_fit.c @@ -25,7 +25,7 @@ int fdt_offset(void *fit) images = fdt_path_offset(fit, FIT_IMAGES_PATH); if (images < 0) { debug("%s: Cannot find /images node: %d\n", __func__, images); - return FDT_ERROR; + return -EINVAL; } fdt_name = fdt_getprop(fit, node, FIT_FDT_PROP, &fdt_len); |