From: Nobuhiro Iwamatsu Date: Fri, 4 Aug 2017 20:47:02 +0000 (+0900) Subject: boot_fit: Change return value from FDT_ERROR to -EINVAL in fdt_offset() X-Git-Tag: v2017.09-rc2~15 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=160cfc4b5a6f761d07ade25472ab1d8408100d1a;p=u-boot 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 CC: Franklin S Cooper Jr Reviewed-by: Franklin S Cooper Jr --- diff --git a/common/boot_fit.c b/common/boot_fit.c index 51440a6e6f..0a723150b5 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);