summaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2018-10-01 11:31:18 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-03 00:52:08 +0200
commit0bb5a1a28ee644798dc3ca167cf9e5ac2058863e (patch)
tree647424c8a70d28b89b7c46c9bb197e3dd3bf0da2 /drivers/thunderbolt
parentmei: samples: fix a signedness bug in amt_host_if_call() (diff)
downloadlinux-0bb5a1a28ee644798dc3ca167cf9e5ac2058863e.tar.xz
linux-0bb5a1a28ee644798dc3ca167cf9e5ac2058863e.zip
thunderbolt: Remove a meaningless NULL pointer check before dma_pool_destroy
dma_pool_destroy() already takes NULL pointer into account so there is no need to check that again in tb_ctl_free(). Signed-off-by: zhong jiang <zhongjiang@huawei.com> [mw: reword commit log a bit] Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/thunderbolt')
-rw-r--r--drivers/thunderbolt/ctl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/thunderbolt/ctl.c b/drivers/thunderbolt/ctl.c
index 37a7f4c735d0..e54e84e43ede 100644
--- a/drivers/thunderbolt/ctl.c
+++ b/drivers/thunderbolt/ctl.c
@@ -662,8 +662,7 @@ void tb_ctl_free(struct tb_ctl *ctl)
tb_ctl_pkg_free(ctl->rx_packets[i]);
- if (ctl->frame_pool)
- dma_pool_destroy(ctl->frame_pool);
+ dma_pool_destroy(ctl->frame_pool);
kfree(ctl);
}