Lines Matching refs:err
53 int err = 0, i; in verify_eraseblock() local
68 err = mtdtest_read(mtd, addr0, bufsize, twopages); in verify_eraseblock()
69 if (err) in verify_eraseblock()
70 return err; in verify_eraseblock()
71 err = mtdtest_read(mtd, addrn - bufsize, bufsize, twopages); in verify_eraseblock()
72 if (err) in verify_eraseblock()
73 return err; in verify_eraseblock()
75 err = mtdtest_read(mtd, addr, bufsize, twopages); in verify_eraseblock()
76 if (err) in verify_eraseblock()
89 err = mtdtest_read(mtd, addr0, bufsize, twopages); in verify_eraseblock()
90 if (err) in verify_eraseblock()
91 return err; in verify_eraseblock()
92 err = mtdtest_read(mtd, addrn - bufsize, bufsize, twopages); in verify_eraseblock()
93 if (err) in verify_eraseblock()
94 return err; in verify_eraseblock()
96 err = mtdtest_read(mtd, addr, bufsize, twopages); in verify_eraseblock()
97 if (err) in verify_eraseblock()
98 return err; in verify_eraseblock()
108 return err; in verify_eraseblock()
113 int err = 0, i; in crosstest() local
135 err = mtdtest_read(mtd, addr, pgsize, pp1); in crosstest()
136 if (err) { in crosstest()
138 return err; in crosstest()
143 err = mtdtest_read(mtd, addr, pgsize, pp1); in crosstest()
144 if (err) { in crosstest()
146 return err; in crosstest()
152 err = mtdtest_read(mtd, addr, pgsize, pp2); in crosstest()
153 if (err) { in crosstest()
155 return err; in crosstest()
161 err = mtdtest_read(mtd, addr, pgsize, pp3); in crosstest()
162 if (err) { in crosstest()
164 return err; in crosstest()
170 err = mtdtest_read(mtd, addr, pgsize, pp4); in crosstest()
171 if (err) { in crosstest()
173 return err; in crosstest()
182 } else if (!err) in crosstest()
185 return err; in crosstest()
190 int err = 0, i, ebnum, ebnum2; in erasecrosstest() local
208 err = mtdtest_erase_eraseblock(mtd, ebnum); in erasecrosstest()
209 if (err) in erasecrosstest()
210 return err; in erasecrosstest()
215 err = mtdtest_write(mtd, addr0, pgsize, writebuf); in erasecrosstest()
216 if (err) in erasecrosstest()
217 return err; in erasecrosstest()
221 err = mtdtest_read(mtd, addr0, pgsize, readbuf); in erasecrosstest()
222 if (err) in erasecrosstest()
223 return err; in erasecrosstest()
233 err = mtdtest_erase_eraseblock(mtd, ebnum); in erasecrosstest()
234 if (err) in erasecrosstest()
235 return err; in erasecrosstest()
240 err = mtdtest_write(mtd, addr0, pgsize, writebuf); in erasecrosstest()
241 if (err) in erasecrosstest()
242 return err; in erasecrosstest()
245 err = mtdtest_erase_eraseblock(mtd, ebnum2); in erasecrosstest()
246 if (err) in erasecrosstest()
247 return err; in erasecrosstest()
251 err = mtdtest_read(mtd, addr0, pgsize, readbuf); in erasecrosstest()
252 if (err) in erasecrosstest()
253 return err; in erasecrosstest()
262 if (!err) in erasecrosstest()
264 return err; in erasecrosstest()
269 int err = 0, i, ebnum, ok = 1; in erasetest() local
282 err = mtdtest_erase_eraseblock(mtd, ebnum); in erasetest()
283 if (err) in erasetest()
284 return err; in erasetest()
288 err = mtdtest_write(mtd, addr0, pgsize, writebuf); in erasetest()
289 if (err) in erasetest()
290 return err; in erasetest()
293 err = mtdtest_erase_eraseblock(mtd, ebnum); in erasetest()
294 if (err) in erasetest()
295 return err; in erasetest()
298 err = mtdtest_read(mtd, addr0, pgsize, twopages); in erasetest()
299 if (err) in erasetest()
300 return err; in erasetest()
313 if (ok && !err) in erasetest()
316 return err; in erasetest()
321 int err = 0; in mtd_pagetest_init() local
338 err = PTR_ERR(mtd); in mtd_pagetest_init()
340 return err; in mtd_pagetest_init()
360 err = -ENOMEM; in mtd_pagetest_init()
375 err = mtdtest_scan_for_bad_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_pagetest_init()
376 if (err) in mtd_pagetest_init()
381 err = mtdtest_erase_good_eraseblocks(mtd, bbt, 0, ebcnt); in mtd_pagetest_init()
382 if (err) in mtd_pagetest_init()
392 err = write_eraseblock(i); in mtd_pagetest_init()
393 if (err) in mtd_pagetest_init()
398 err = mtdtest_relax(); in mtd_pagetest_init()
399 if (err) in mtd_pagetest_init()
410 err = verify_eraseblock(i); in mtd_pagetest_init()
411 if (err) in mtd_pagetest_init()
416 err = mtdtest_relax(); in mtd_pagetest_init()
417 if (err) in mtd_pagetest_init()
422 err = crosstest(); in mtd_pagetest_init()
423 if (err) in mtd_pagetest_init()
427 err = erasecrosstest(); in mtd_pagetest_init()
428 if (err) in mtd_pagetest_init()
434 err = erasetest(); in mtd_pagetest_init()
435 if (err) in mtd_pagetest_init()
446 if (err) in mtd_pagetest_init()
447 pr_info("error %d occurred\n", err); in mtd_pagetest_init()
449 return err; in mtd_pagetest_init()