aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeenu Viswambharan <jeenu.viswambharan@arm.com>2014-02-20 11:51:00 +0000
committerDan Handley <dan.handley@arm.com>2014-02-20 19:06:34 +0000
commitdd3dc32f1d2a263a3cb587f9593ab3822645e1d7 (patch)
treea9c45a9edb8abe68b4fc2e6a286980dafc9cb8e9
parent7c88f3f633288856dd691dfda222e60092e4dab9 (diff)
downloadarm-trusted-firmware-dd3dc32f1d2a263a3cb587f9593ab3822645e1d7.tar.gz
Fix FIP offset address when file not found
If there is a request to open a file from FIP, and that file is not found, the driver fails to reset the offset address. This causes subsequent file loads to fail. This patch resets the offset address to zero if a file is not found so that subsequent file loads are unaffected. Change-Id: I16418e35f92fb7c85fb12e2acc071990520cdef8
-rw-r--r--drivers/io/io_fip.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/io/io_fip.c b/drivers/io/io_fip.c
index 6a7f123..8a95708 100644
--- a/drivers/io/io_fip.c
+++ b/drivers/io/io_fip.c
@@ -298,6 +298,7 @@ static int fip_file_open(struct io_dev_info *dev_info, const void *spec,
entity->info = (uintptr_t)&current_file;
} else {
/* Did not find the file in the FIP. */
+ current_file.entry.offset_address = 0;
result = IO_FAIL;
}