Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282928
b: refs/heads/master
c: e57e0d8
h: refs/heads/master
v: v3
  • Loading branch information
Artem Bityutskiy committed Jan 5, 2012
1 parent d614fc1 commit e3eaa47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e801e128b2200c40a0ec236cf2330b2586b6e05a
refs/heads/master: e57e0d8e818512047fe379157c3f77f1b9fabffb
7 changes: 4 additions & 3 deletions trunk/drivers/mtd/ubi/wl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,6 @@ static int erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk,

ubi_err("failed to erase PEB %d, error %d", pnum, err);
kfree(wl_wrk);
kmem_cache_free(ubi_wl_entry_slab, e);

if (err == -EINTR || err == -ENOMEM || err == -EAGAIN ||
err == -EBUSY) {
Expand All @@ -1065,14 +1064,16 @@ static int erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk,
goto out_ro;
}
return err;
} else if (err != -EIO) {
}

kmem_cache_free(ubi_wl_entry_slab, e);
if (err != -EIO)
/*
* If this is not %-EIO, we have no idea what to do. Scheduling
* this physical eraseblock for erasure again would cause
* errors again and again. Well, lets switch to R/O mode.
*/
goto out_ro;
}

/* It is %-EIO, the PEB went bad */

Expand Down

0 comments on commit e3eaa47

Please sign in to comment.