summaryrefslogtreecommitdiff
path: root/ubi-utils/src
diff options
context:
space:
mode:
Diffstat (limited to 'ubi-utils/src')
-rw-r--r--ubi-utils/src/ubiformat.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/ubi-utils/src/ubiformat.c b/ubi-utils/src/ubiformat.c
index 3f1f512..fe7040e 100644
--- a/ubi-utils/src/ubiformat.c
+++ b/ubi-utils/src/ubiformat.c
@@ -527,10 +527,8 @@ static int flash_image(const struct mtd_dev_info *mtd, struct ubi_scan_info *si)
err = mtd_torture(mtd, args.node_fd, eb);
if (err) {
- if (mark_bad(mtd, si, eb)) {
- normsg("operation incomplete");
+ if (mark_bad(mtd, si, eb))
goto out_close;
- }
}
continue;
}
@@ -636,9 +634,10 @@ static int format(const struct mtd_dev_info *mtd, const struct ubigen_info *ui,
goto out_free;
}
- if (mark_bad(mtd, si, eb)) {
- normsg("operation incomplete");
- goto out_free;
+ err = mtd_torture(mtd, args.node_fd, eb);
+ if (err) {
+ if (mark_bad(mtd, si, eb))
+ goto out_free;
}
continue;