[PATCH] mtd: Add simple read disturb test

Fabio Estevam festevam at gmail.com
Thu Apr 2 08:02:24 PDT 2015


On Thu, Apr 2, 2015 at 11:13 AM, Richard Weinberger <richard at nod.at> wrote:

> +               ret = mtdtest_erase_eraseblock(mtd, i);
> +               if (ret) {
> +                       err = ret;
> +                       goto out;
> +               }

Why not just do like this instead?

              err = mtdtest_erase_eraseblock(mtd, i);
              if (err)
                 goto out;

> +
> +               ret = mtdtest_write(mtd, i * mtd->erasesize, mtd->erasesize,
> +                                   iobuf_orig);
> +               if (ret) {
> +                       err = ret;
> +                       goto out;
> +               }

Same here.

> +               ret = mtdtest_relax();
> +               if (ret)
> +                       goto out;

Here you propagate the wrong error. You test for 'ret' and propagate 'err'.



More information about the linux-mtd mailing list