summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-03-31 17:24:19 -0400
committerTom Rini <trini@konsulko.com>2020-03-31 17:24:19 -0400
commit2b18b89156335bf1f0d84f81d3597762bc48c61d (patch)
tree544e93c39bfaeff20b2ac47980de27edf1a585e4 /common
parent779e6dc6a429ac28dfd4f07ab0c3648a31399d4a (diff)
parentac28e59a574dd231a4787752d923f618587e3d10 (diff)
Merge branch 'next' of git://git.denx.de/u-boot-usb into next
Diffstat (limited to 'common')
-rw-r--r--common/image-fit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/image-fit.c b/common/image-fit.c
index 9357e66e1f..6fc2799b14 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -1011,8 +1011,10 @@ int fit_image_get_data_and_size(const void *fit, int noffset,
if (external_data) {
debug("External Data\n");
ret = fit_image_get_data_size(fit, noffset, &len);
- *data = fit + offset;
- *size = len;
+ if (!ret) {
+ *data = fit + offset;
+ *size = len;
+ }
} else {
ret = fit_image_get_data(fit, noffset, data, size);
}