Huge cleanup of type warnings etc.
[yaffs2.git] / yaffs_tagsmarshall.c
index a5989fa952355958bffa92c8071fc5d6ff2dad0c..98ae10d2a760e73a9a43b1ac3ab4f4b8c9409144 100644 (file)
@@ -124,7 +124,7 @@ static int yaffs_tags_marshall_read(struct yaffs_dev *dev,
                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;