pastebin

Paste #91947: Untitled ASCII paste by 2601:644:201:bf23:7e7a:91ff:fe51:1b2

diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index ab3a7b6..de09a92 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -1233,7 +1233,7 @@ static int mtd_ooblayout_set_bytes(struct mtd_info *mtd, const u8 *buf,
 					    struct mtd_oob_region *oobregion))
 {
 	struct mtd_oob_region oobregion = { };
-	int section = 0, ret;
+	int section = 0, ret, reqbytes = nbytes;
 
 	ret = mtd_ooblayout_find_region(mtd, start, §ion,
 					&oobregion, iter);
@@ -1253,6 +1253,10 @@ static int mtd_ooblayout_set_bytes(struct mtd_info *mtd, const u8 *buf,
 		nbytes -= cnt;
 	}
 
+	if (nbytes)
+		pr_err("ooblayout: requested %d bytes only found %d\n",
+			reqbytes, reqbytes - nbytes);
+
 	return !nbytes ? 0 : -ERANGE;
 }

Private
Wrap long lines

2 + 2 =