projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86f6e45
)
UBI: drop null test before destroy functions
author
Julia Lawall
<julia.lawall@lip6.fr>
Sun, 13 Sep 2015 12:15:16 +0000
(14:15 +0200)
committer
Richard Weinberger
<richard@nod.at>
Sat, 3 Oct 2015 18:36:10 +0000
(20:36 +0200)
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>
drivers/mtd/ubi/attach.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/mtd/ubi/attach.c
b/drivers/mtd/ubi/attach.c
index 68eea5befaf12c96db4063a32ab81c20a8abfd96..c1aaf0336cf2e389386b4a6f7c87a8609652b474 100644
(file)
--- a/
drivers/mtd/ubi/attach.c
+++ b/
drivers/mtd/ubi/attach.c
@@
-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);
}