ubi: no NULL check needed before kmem_cache_destroy
kmem_cache_destroy calls free which checks for NULL. Problem was indicated by coccinelle. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
parent
4b29975fd0
commit
cd5f33e5fc
@ -1205,8 +1205,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