lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1534508696-36242-1-git-send-email-zhongjiang@huawei.com>
Date:   Fri, 17 Aug 2018 20:24:56 +0800
From:   zhong jiang <zhongjiang@...wei.com>
To:     <andreas.noever@...il.com>, <michael.jamet@...el.com>,
        <mika.westerberg@...ux.intel.com>, <YehezkelShB@...il.com>
CC:     <linux-kernel@...r.kernel.org>
Subject: [PATCH] thunderbolt: remove a meaningless null pointer check before dma_pool_destroy

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

Signed-off-by: zhong jiang <zhongjiang@...wei.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ