X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=yaffs_tagsmarshall.c;h=98ae10d2a760e73a9a43b1ac3ab4f4b8c9409144;hb=refs%2Fheads%2Fclean-up;hp=44a83b12ca4d07cfa84fbb86fc80961ff738bf5a;hpb=54721f22512e7c859c4c4a4ae7e5374ecf7fb570;p=yaffs2.git diff --git a/yaffs_tagsmarshall.c b/yaffs_tagsmarshall.c index 44a83b1..98ae10d 100644 --- a/yaffs_tagsmarshall.c +++ b/yaffs_tagsmarshall.c @@ -118,13 +118,13 @@ static int yaffs_tags_marshall_read(struct yaffs_dev *dev, dev->n_ecc_unfixed++; } - if (tags && ecc_result == -YAFFS_ECC_RESULT_FIXED) { + if (tags && ecc_result == YAFFS_ECC_RESULT_FIXED) { if (tags->ecc_result <= YAFFS_ECC_RESULT_NO_ERROR) tags->ecc_result = YAFFS_ECC_RESULT_FIXED; dev->n_ecc_fixed++; } - if (ecc_result < YAFFS_ECC_RESULT_UNFIXED) + if (retval == YAFFS_OK && ecc_result < YAFFS_ECC_RESULT_UNFIXED) return YAFFS_OK; else return YAFFS_FAIL;