last minute bugfixes
[openwrt-10.03/.git] / package / openwrt / mtd.c
index ff104c6575e441edd3882e01e9dac01767e87876..296bf4b63af25514786c53019873505462681969 100644 (file)
@@ -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);