[MTD] NAND Signal that a bitflip was corrected by ECC

Return -EUCLEAN on read when a bitflip was detected and corrected, so the
clients can react and eventually copy the affected block to a spare one.
Make all in kernel users aware of the change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c
index 38151b8..3c8d5e6 100644
--- a/drivers/mtd/mtdconcat.c
+++ b/drivers/mtd/mtdconcat.c
@@ -56,7 +56,7 @@
 	    size_t * retlen, u_char * buf)
 {
 	struct mtd_concat *concat = CONCAT(mtd);
-	int err = -EINVAL;
+	int ret = 0, err = -EINVAL;
 	int i;
 
 	*retlen = 0;
@@ -80,9 +80,18 @@
 
 		err = subdev->read(subdev, from, size, &retsize, buf);
 
-		if (err)
+		if (err && (err != -EBADMSG) && (err != -EUCLEAN))
 			break;
 
+		/* Save information about bitflips! */
+		if (err) {
+			if (err == -EBADMSG)
+				ret = err;
+			else if (!ret)
+				ret = err;
+			err = 0;
+		}
+
 		*retlen += retsize;
 		len -= size;
 		if (len == 0)
@@ -92,7 +101,7 @@
 		buf += size;
 		from = 0;
 	}
-	return err;
+	return err ? err : ret;
 }
 
 static int