diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2017-11-08 22:30:59 +0100 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2017-11-20 10:13:42 +0100 |
commit | cd5f33e5fc832effd70866fccd629046a6dac265 (patch) | |
tree | 80234b2e516fa9fd2c0469a1af5b65e74dee6e23 /drivers/mtd/ubi | |
parent | 4b29975fd0f25256d8e643076a2c4c5f9de00f8f (diff) |
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>
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r-- | drivers/mtd/ubi/attach.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c index 90fb74a5c9..33c176a77b 100644 --- a/drivers/mtd/ubi/attach.c +++ b/drivers/mtd/ubi/attach.c @@ -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); } |