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
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 @@
entity->info = (uintptr_t)¤t_file;
} else {
/* Did not find the file in the FIP. */
+ current_file.entry.offset_address = 0;
result = IO_FAIL;
}