diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2015-09-13 14:15:01 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2015-09-29 15:01:47 +0200 |
commit | 0220531a13b83d0049dcf1391a5a0cb10346962f (patch) | |
tree | e7158248c93c77786133c93b7013ebded73fb7ca | |
parent | MAINTAINERS: update my e-mail address (diff) | |
download | linux-0220531a13b83d0049dcf1391a5a0cb10346962f.tar.xz linux-0220531a13b83d0049dcf1391a5a0cb10346962f.zip |
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>
-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 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); |