on TI OMAPL138 EVM board, the NAND Flash have 22 bytes free in OOB area. When yaffs2 writes the 28-byte tags into NAND OOB area, the NAND subsystem doesn't give any WARNING or ERROR. Move the checking of validity of oob data from nand_do_write_oob into nand_write_oob to fix this problem.