diff options
-rw-r--r-- | drivers/mtd/ubi/io.c | 5 | ||||
-rw-r--r-- | drivers/mtd/ubi/wl.c | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c index b0d8f4cede97..d42ec687b014 100644 --- a/drivers/mtd/ubi/io.c +++ b/drivers/mtd/ubi/io.c | |||
@@ -430,13 +430,16 @@ static int torture_peb(const struct ubi_device *ubi, int pnum) | |||
430 | err = patt_count; | 430 | err = patt_count; |
431 | 431 | ||
432 | out: | 432 | out: |
433 | if (err == UBI_IO_BITFLIPS || err == -EBADMSG) | 433 | if (err == UBI_IO_BITFLIPS || err == -EBADMSG) { |
434 | /* | 434 | /* |
435 | * If a bit-flip or data integrity error was detected, the test | 435 | * If a bit-flip or data integrity error was detected, the test |
436 | * has not passed because it happened on a freshly erased | 436 | * has not passed because it happened on a freshly erased |
437 | * physical eraseblock which means something is wrong with it. | 437 | * physical eraseblock which means something is wrong with it. |
438 | */ | 438 | */ |
439 | ubi_err("read problems on freshly erased PEB %d, must be bad", | ||
440 | pnum); | ||
439 | err = -EIO; | 441 | err = -EIO; |
442 | } | ||
440 | vfree(buf); | 443 | vfree(buf); |
441 | return err; | 444 | return err; |
442 | } | 445 | } |
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index a5a9b8d87302..12b25e5b7b81 100644 --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c | |||
@@ -1093,6 +1093,7 @@ static int erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk, | |||
1093 | return err; | 1093 | return err; |
1094 | } | 1094 | } |
1095 | 1095 | ||
1096 | ubi_err("failed to erase PEB %d, error %d", pnum, err); | ||
1096 | kfree(wl_wrk); | 1097 | kfree(wl_wrk); |
1097 | kmem_cache_free(wl_entries_slab, e); | 1098 | kmem_cache_free(wl_entries_slab, e); |
1098 | 1099 | ||