MTD NAND: Fix a misplaced endif

This commit is contained in:
Gregory Nutt 2013-12-01 21:06:07 -06:00
parent 5b9d07e5c0
commit 7847443f5a
2 changed files with 4 additions and 4 deletions

View File

@ -300,9 +300,9 @@ static int hamming_verify256(FAR uint8_t *data, FAR const uint8_t *original)
/* If all bytes are 0, there is no error */
if ((correction[0] == 0) && (correction[1] == 0) && (correction[2] == 0))
{
{
return 0;
}
}
/* If there is a single bit error, there are 11 bits set to 1 */
@ -333,7 +333,7 @@ static int hamming_verify256(FAR uint8_t *data, FAR const uint8_t *original)
data[byte] ^= (1 << bit);
return HAMMING_ERROR_SINGLEBIT;
}
}
/* Check if ECC has been corrupted */

View File

@ -523,6 +523,7 @@ static int nand_writepage(FAR struct nand_dev_s *nand, off_t block,
fdbg("ERROR: Block is BAD\n");
return -EAGAIN;
}
#endif
#ifdef CONFIG_MTD_NAND_SWECC
/* nandecc_writepage will handle the software ECC case */
@ -540,7 +541,6 @@ static int nand_writepage(FAR struct nand_dev_s *nand, off_t block,
*/
else
#endif
#endif
{
return NAND_WRITEPAGE(nand->raw, block, page, data, NULL);