summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--external/common/arch_flash_powerpc.c4
-rw-r--r--external/common/arch_flash_x86.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/external/common/arch_flash_powerpc.c b/external/common/arch_flash_powerpc.c
index 19dfec8c..7ce962ec 100644
--- a/external/common/arch_flash_powerpc.c
+++ b/external/common/arch_flash_powerpc.c
@@ -200,7 +200,9 @@ static struct blocklevel_device *arch_init_blocklevel(const char *file, bool kee
return NULL;
}
- file_init_path(file ? file : real_file, NULL, keep_alive, &new_bl);
+ rc = file_init_path(file ? file : real_file, NULL, keep_alive, &new_bl);
+ if (rc)
+ new_bl = NULL;
free(real_file);
return new_bl;
}
diff --git a/external/common/arch_flash_x86.c b/external/common/arch_flash_x86.c
index 3be05dfc..0146243d 100644
--- a/external/common/arch_flash_x86.c
+++ b/external/common/arch_flash_x86.c
@@ -30,6 +30,7 @@
int arch_flash_init(struct blocklevel_device **r_bl, const char *file, bool keep_alive)
{
+ int rc;
struct blocklevel_device *new_bl;
/* Must have passed through a file to operate on */
@@ -38,8 +39,8 @@ int arch_flash_init(struct blocklevel_device **r_bl, const char *file, bool keep
return -1;
}
- file_init_path(file, NULL, keep_alive, &new_bl);
- if (!new_bl)
+ rc = file_init_path(file, NULL, keep_alive, &new_bl);
+ if (rc)
return -1;
*r_bl = new_bl;
OpenPOWER on IntegriCloud