diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2015-09-13 12:15:01 (GMT) |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2015-09-29 13:01:47 (GMT) |
commit | 0220531a13b83d0049dcf1391a5a0cb10346962f (patch) | |
tree | e7158248c93c77786133c93b7013ebded73fb7ca /drivers/block | |
parent | e5f6450c3f40668de0b9c4cbc53bb345242df78f (diff) | |
download | linux-0220531a13b83d0049dcf1391a5a0cb10346962f.tar.xz |
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.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 4c20c22..49375a4 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); |