[PATCH 15/21] UBI: Fastmap: Fix NULL-pointer bug
Richard Weinberger
richard at nod.at
Wed Jun 13 06:42:12 EDT 2012
Signed-off-by: Richard Weinberger <richard at nod.at>
---
drivers/mtd/ubi/fastmap.c | 4 ++--
drivers/mtd/ubi/wl.c | 3 ---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index 29e6d69..65cb3f1 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -1342,8 +1342,8 @@ int ubi_update_fastmap(struct ubi_device *ubi)
goto err;
}
- new_fm->e[0]->pnum = old_fm->e[0]->pnum;
- new_fm->e[0]->ec = old_fm->e[0]->ec;
+ tmp_e->pnum = old_fm->e[0]->pnum;
+ tmp_e->ec = old_fm->e[0]->ec;
} else {
/* we've got a new early PEB, return the old one */
ubi_wl_put_fm_peb(ubi, old_fm->e[0], 0);
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
index def6a88..004ce89 100644
--- a/drivers/mtd/ubi/wl.c
+++ b/drivers/mtd/ubi/wl.c
@@ -1251,9 +1251,6 @@ static int erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk,
* protected physical eraseblocks.
*/
serve_prot_queue(ubi);
-
- /* And take care about wear-leveling */
- err = ensure_wear_leveling(ubi);
return err;
}
--
1.7.6.5
More information about the linux-mtd
mailing list