summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2015-09-13 14:15:01 +0200
committerJiri Kosina <jkosina@suse.cz>2015-09-29 15:01:47 +0200
commit0220531a13b83d0049dcf1391a5a0cb10346962f (patch)
treee7158248c93c77786133c93b7013ebded73fb7ca /drivers/block
parente5f6450c3f40668de0b9c4cbc53bb345242df78f (diff)
pktcdvd: drop null test before destroy functions
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: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/pktcdvd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 4c20c228184c..49375a42feb9 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -2822,8 +2822,7 @@ out_new_dev:
out_mem2:
put_disk(disk);
out_mem:
- if (pd->rb_pool)
- mempool_destroy(pd->rb_pool);
+ mempool_destroy(pd->rb_pool);
kfree(pd);
out_mutex:
mutex_unlock(&ctl_mutex);