public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] thunderbolt: remove a meaningless null pointer check before dma_pool_destroy
@ 2018-08-17 12:24 zhong jiang
  2018-08-20 11:35 ` Mika Westerberg
  0 siblings, 1 reply; 2+ messages in thread
From: zhong jiang @ 2018-08-17 12:24 UTC (permalink / raw)
  To: andreas.noever, michael.jamet, mika.westerberg, YehezkelShB; +Cc: linux-kernel

dma_pool_destroy has taken the null pointer into account. so just
remove the null pointer check.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 drivers/thunderbolt/ctl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/thunderbolt/ctl.c b/drivers/thunderbolt/ctl.c
index 37a7f4c..e54e84e 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);
 }
 
-- 
1.7.12.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-20 11:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-17 12:24 [PATCH] thunderbolt: remove a meaningless null pointer check before dma_pool_destroy zhong jiang
2018-08-20 11:35 ` Mika Westerberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox