Lines Matching refs:rval
480 int rval; in nand_verify_page_oob() local
493 rval = mtd_read_oob(mtd, ofs, &vops); in nand_verify_page_oob()
494 if (!rval) in nand_verify_page_oob()
495 rval = memcmp(ops->datbuf, vops.datbuf, vops.len); in nand_verify_page_oob()
496 if (!rval) in nand_verify_page_oob()
497 rval = memcmp(ops->oobbuf, vops.oobbuf, vops.ooblen); in nand_verify_page_oob()
501 return rval ? -EIO : 0; in nand_verify_page_oob()
520 int rval = 0; in nand_verify() local
532 rval = nand_read(mtd, verofs, &verlen, verbuf); in nand_verify()
533 if (!rval || (rval == -EUCLEAN)) in nand_verify()
534 rval = memcmp(buf, verbuf, verlen); in nand_verify()
536 if (rval) in nand_verify()
542 return rval ? -EIO : 0; in nand_verify()
574 int rval = 0, blocksize; in nand_write_skip_bad() local
620 rval = nand_write(mtd, offset, length, buffer); in nand_write_skip_bad()
622 if ((flags & WITH_WR_VERIFY) && !rval) in nand_write_skip_bad()
623 rval = nand_verify(mtd, offset, *length, buffer); in nand_write_skip_bad()
625 if (rval == 0) in nand_write_skip_bad()
630 offset, rval); in nand_write_skip_bad()
631 return rval; in nand_write_skip_bad()
659 rval = nand_write(mtd, offset, &truncated_write_size, in nand_write_skip_bad()
662 if ((flags & WITH_WR_VERIFY) && !rval) in nand_write_skip_bad()
663 rval = nand_verify(mtd, offset, in nand_write_skip_bad()
669 if (rval != 0) { in nand_write_skip_bad()
671 offset, rval); in nand_write_skip_bad()
673 return rval; in nand_write_skip_bad()
708 int rval; in nand_read_skip_bad() local
740 rval = nand_read(mtd, offset, length, buffer); in nand_read_skip_bad()
741 if (!rval || rval == -EUCLEAN) in nand_read_skip_bad()
746 offset, rval); in nand_read_skip_bad()
747 return rval; in nand_read_skip_bad()
768 rval = nand_read(mtd, offset, &read_length, p_buffer); in nand_read_skip_bad()
769 if (rval && rval != -EUCLEAN) { in nand_read_skip_bad()
771 offset, rval); in nand_read_skip_bad()
773 return rval; in nand_read_skip_bad()