diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-11-23 09:21:45 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-01-10 08:27:33 +0100 |
commit | fda5f54de8f6020bf316636b365aa23456ba3750 (patch) | |
tree | 9c6b947ec0e6e9f49862450d7d96f8ec936cdb57 | |
parent | 30f85100b1d2a941b93476a45c018851a049030a (diff) | |
download | barebox-fda5f54de8f6020bf316636b365aa23456ba3750.tar.gz barebox-fda5f54de8f6020bf316636b365aa23456ba3750.tar.xz |
mtd: peb: fix usage of uninitialized variable
'read' is used in an error message but never assigned a value to. Remove
the variable.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/mtd/peb.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/peb.c b/drivers/mtd/peb.c index 639dc0ee6f..73f90bb9e7 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; } |