aboutsummaryrefslogtreecommitdiff
path: root/tools/env
diff options
context:
space:
mode:
Diffstat (limited to 'tools/env')
-rw-r--r--tools/env/fw_env.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index 66cb9d2..2a61a5d 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -1208,7 +1208,7 @@ static int flash_write(int fd_current, int fd_target, int dev_target)
if (IS_UBI(dev_target)) {
if (ubi_update_start(fd_target, CUR_ENVSIZE) < 0)
- return 0;
+ return -1;
return ubi_write(fd_target, environment.image, CUR_ENVSIZE);
}