Lines Matching refs:res
170 int res, ret = 0, i, j, act = 0;
193 res = mtd_read(mtd, from, len, &retlen, buf);
194 if (res < 0) {
195 if (mtd_is_eccerr(res)) {
198 return res;
199 } else if (mtd_is_bitflip(res)) {
202 ret = res;
205 return res;
264 int res = 0, i;
270 res = read_bbt(this, buf, td->pages[i],
273 if (res)
274 return res;
278 res = read_bbt(this, buf, td->pages[0],
280 if (res)
281 return res;
317 int res, ret = 0;
328 res = mtd_read_oob(mtd, offs, &ops);
329 if (res) {
330 if (!mtd_is_bitflip_or_eccerr(res))
331 return res;
332 else if (mtd_is_eccerr(res) || !ret)
333 ret = res;
722 int res;
727 res = nand_markbad_bbm(this, to);
728 if (res)
730 res, block);
752 int i, res, chip = 0;
790 res = block;
826 res = mtd_read(mtd, to, len, &retlen, buf);
827 if (res < 0) {
830 return res;
837 res = mtd_read_oob(mtd, to + mtd->writesize, &ops);
838 if (res < 0 || ops.oobretlen != ops.ooblen)
892 res = nand_erase_nand(this, &einfo, 1);
893 if (res < 0) {
895 res);
900 res = scan_write_bbt(this, to, len, buf,
903 if (res < 0) {
905 res);
919 pr_warn("nand_bbt: error while writing bad block table %d\n", res);
920 return res;
953 int i, chips, writeops, create, chipsel, res, res2;
969 res = res2 = 0;
1019 res = read_abs_bbt(this, buf, rd, chipsel);
1020 if (mtd_is_eccerr(res)) {
1041 if (mtd_is_bitflip(res) || mtd_is_bitflip(res2))
1052 res = write_bbt(this, buf, td, md, chipsel);
1053 if (res < 0)
1054 return res;
1059 res = write_bbt(this, buf, md, td, chipsel);
1060 if (res < 0)
1061 return res;
1077 int len, res = 0;
1108 res = write_bbt(this, buf, td, md, chipsel);
1109 if (res < 0)
1114 res = write_bbt(this, buf, md, td, chipsel);
1119 return res;
1247 int len, res;
1266 if ((res = nand_memory_bbt(this, bd))) {
1280 res = -ENOMEM;
1292 res = check_create(this, buf, bd);
1293 if (res)
1309 return res;
1450 int block, res;
1453 res = bbt_get_entry(this, block);
1456 (unsigned int)offs, block, res);
1461 switch (res) {