[PATCH 05/10] mtd: peb: fix usage of uninitialized variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



'read' is used in an error message but never assigned a value to. Remove
the variable.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 drivers/mtd/peb.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/peb.c b/drivers/mtd/peb.c
index 639dc0e..73f90bb 100644
--- a/drivers/mtd/peb.c
+++ b/drivers/mtd/peb.c
@@ -252,7 +252,6 @@ retry:
 int mtd_peb_check_all_ff(struct mtd_info *mtd, int pnum, int offset, int len,
 			 int warn)
 {
-	size_t read;
 	int err;
 	void *buf;
 
@@ -263,8 +262,8 @@ int mtd_peb_check_all_ff(struct mtd_info *mtd, int pnum, int offset, int len,
 	err = mtd_peb_read(mtd, buf, pnum, offset, len);
 	if (err && !mtd_is_bitflip(err)) {
 		dev_err(&mtd->class_dev,
-			"error %d while reading %d bytes from PEB %d:%d, read %zd bytes\n",
-			err, len, pnum, offset, read);
+			"error %d while reading %d bytes from PEB %d:%d\n",
+			err, len, pnum, offset);
 		goto out;
 	}
 
-- 
2.10.2


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux