--- arch/arm/lib32/bootm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/lib32/bootm.c b/arch/arm/lib32/bootm.c index a653374e5f..180624445d 100644 --- a/arch/arm/lib32/bootm.c +++ b/arch/arm/lib32/bootm.c @@ -185,14 +185,13 @@ static int bootm_load_tee_from_file(struct image_data *data) if (read_full(fd, (void *)data->tee_res->start, hdr.init_size) < 0) { pr_err("%s", strerror(errno)); ret = -errno; - goto out_res; + release_region(data->tee_res); + goto out; } printf("Read optee file to %pa, size 0x%08x\n", (void *)data->tee_res->start, hdr.init_size); ret = 0; -out_res: - release_region(data->tee_res); out: close(fd); -- 2.21.0 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox