projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b29975
)
ubi: no NULL check needed before kmem_cache_destroy
author
Heinrich Schuchardt
<xypron.glpk@gmx.de>
Wed, 8 Nov 2017 21:30:59 +0000
(22:30 +0100)
committer
Heiko Schocher
<hs@denx.de>
Mon, 20 Nov 2017 09:13:42 +0000
(10:13 +0100)
kmem_cache_destroy calls free which checks for NULL.
Problem was indicated by coccinelle.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
drivers/mtd/ubi/attach.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/ubi/attach.c
b/drivers/mtd/ubi/attach.c
index 90fb74a5c966baeadf01e69c5ca6da9bb88d7e0f..33c176a77bdcb30ffea9c341da93c4a73885b1ec 100644
(file)
--- 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);
}