|
@@ -1617,8 +1617,10 @@ int ubi_wl_init(struct ubi_device *ubi, struct ubi_attach_info *ai)
|
|
cond_resched();
|
|
cond_resched();
|
|
|
|
|
|
e = kmem_cache_alloc(ubi_wl_entry_slab, GFP_KERNEL);
|
|
e = kmem_cache_alloc(ubi_wl_entry_slab, GFP_KERNEL);
|
|
- if (!e)
|
|
|
|
|
|
+ if (!e) {
|
|
|
|
+ err = -ENOMEM;
|
|
goto out_free;
|
|
goto out_free;
|
|
|
|
+ }
|
|
|
|
|
|
e->pnum = aeb->pnum;
|
|
e->pnum = aeb->pnum;
|
|
e->ec = aeb->ec;
|
|
e->ec = aeb->ec;
|
|
@@ -1637,8 +1639,10 @@ int ubi_wl_init(struct ubi_device *ubi, struct ubi_attach_info *ai)
|
|
cond_resched();
|
|
cond_resched();
|
|
|
|
|
|
e = kmem_cache_alloc(ubi_wl_entry_slab, GFP_KERNEL);
|
|
e = kmem_cache_alloc(ubi_wl_entry_slab, GFP_KERNEL);
|
|
- if (!e)
|
|
|
|
|
|
+ if (!e) {
|
|
|
|
+ err = -ENOMEM;
|
|
goto out_free;
|
|
goto out_free;
|
|
|
|
+ }
|
|
|
|
|
|
e->pnum = aeb->pnum;
|
|
e->pnum = aeb->pnum;
|
|
e->ec = aeb->ec;
|
|
e->ec = aeb->ec;
|