forked from luck/tmp_suning_uos_patched
UBI: drop null test before destroy functions
Remove unneeded NULL test. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x; @@ -if (x != NULL) \(kmem_cache_destroy\|mempool_destroy\|dma_pool_destroy\)(x); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
parent
86f6e454e6
commit
f9a113d65f
|
@ -1209,9 +1209,7 @@ static void destroy_ai(struct ubi_attach_info *ai)
|
|||
}
|
||||
}
|
||||
|
||||
if (ai->aeb_slab_cache)
|
||||
kmem_cache_destroy(ai->aeb_slab_cache);
|
||||
|
||||
kmem_cache_destroy(ai->aeb_slab_cache);
|
||||
kfree(ai);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user