More clean up
[yaffs2.git] / yaffs_tagsmarshall.c
index 44a83b12ca4d07cfa84fbb86fc80961ff738bf5a..98ae10d2a760e73a9a43b1ac3ab4f4b8c9409144 100644 (file)
@@ -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;