summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2017-11-09 00:30:59 +0300
committerHeiko Schocher <hs@denx.de>2017-11-20 12:13:42 +0300
commitcd5f33e5fc832effd70866fccd629046a6dac265 (patch)
tree80234b2e516fa9fd2c0469a1af5b65e74dee6e23
parent4b29975fd0f25256d8e643076a2c4c5f9de00f8f (diff)
downloadu-boot-cd5f33e5fc832effd70866fccd629046a6dac265.tar.xz
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>
-rw-r--r--drivers/mtd/ubi/attach.c3
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);
}