summaryrefslogtreecommitdiffstats
path: root/package/openwrt/mtd.c
diff options
context:
space:
mode:
Diffstat (limited to 'package/openwrt/mtd.c')
-rw-r--r--package/openwrt/mtd.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/package/openwrt/mtd.c b/package/openwrt/mtd.c
index ff104c657..296bf4b63 100644
--- a/package/openwrt/mtd.c
+++ b/package/openwrt/mtd.c
@@ -140,11 +140,7 @@ mtd_erase(const char *mtd)
mtdEraseInfo.start < mtdInfo.size;
mtdEraseInfo.start += mtdInfo.erasesize) {
- if(ioctl(fd, MEMUNLOCK, &mtdEraseInfo)) {
- fprintf(stderr, "Could not unlock MTD device: %s\n", mtd);
- close(fd);
- exit(1);
- }
+ ioctl(fd, MEMUNLOCK, &mtdEraseInfo);
if(ioctl(fd, MEMERASE, &mtdEraseInfo)) {
fprintf(stderr, "Could not erase MTD device: %s\n", mtd);
close(fd);