oslib/libmtd: Removing useless err assigment
[fio.git] / oslib / libmtd.c
index 5c9eac2778c69a5b4bead766f70d74bdc0939705..5d18871b55e82f4c86704a9a284de2c9a519b9d8 100644 (file)
@@ -1002,7 +1002,6 @@ int mtd_torture(libmtd_t desc, const struct mtd_dev_info *mtd, int fd, int eb)
                }
        }
 
-       err = 0;
        normsg("PEB %d passed torture test, do not mark it a bad", eb);
 
 out:
@@ -1116,6 +1115,7 @@ static int legacy_auto_oob_layout(const struct mtd_dev_info *mtd, int fd,
                len = mtd->oob_size - start;
                memcpy(oob + start, tmp_buf + start, len);
        }
+       free(tmp_buf);
 
        return 0;
 }
@@ -1190,7 +1190,7 @@ int mtd_write(libmtd_t desc, const struct mtd_dev_info *mtd, int fd, int eb,
        return 0;
 }
 
-int do_oob_op(libmtd_t desc, const struct mtd_dev_info *mtd, int fd,
+static int do_oob_op(libmtd_t desc, const struct mtd_dev_info *mtd, int fd,
              uint64_t start, uint64_t length, void *data, unsigned int cmd64,
              unsigned int cmd)
 {