9
0
Fork 0

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>
This commit is contained in:
Sascha Hauer 2016-11-23 09:21:45 +01:00
parent 30f85100b1
commit fda5f54de8
1 changed files with 2 additions and 3 deletions

View File

@ -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;
}