summaryrefslogtreecommitdiff
path: root/net/rds
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-10-15 14:47:36 +0300
committerDavid S. Miller <davem@davemloft.net>2019-10-17 22:23:03 +0300
commitce753e66dcc37e19572a87f70585ec6537dede81 (patch)
tree7b90bb692f4ab26e8a21b0712508f56600c75e27 /net/rds
parent0c5378f9d5003334775ea0e5e9934976aa4a1b66 (diff)
downloadlinux-ce753e66dcc37e19572a87f70585ec6537dede81.tar.xz
net/rds: Remove unnecessary null check
Null check before dma_pool_destroy is redundant, so remove it. This is detected by coccinelle. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds')
-rw-r--r--net/rds/ib.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/rds/ib.c b/net/rds/ib.c
index 62d4ebeb08c1..3fd5f40189bd 100644
--- a/net/rds/ib.c
+++ b/net/rds/ib.c
@@ -108,8 +108,7 @@ static void rds_ib_dev_free(struct work_struct *work)
rds_ib_destroy_mr_pool(rds_ibdev->mr_1m_pool);
if (rds_ibdev->pd)
ib_dealloc_pd(rds_ibdev->pd);
- if (rds_ibdev->rid_hdrs_pool)
- dma_pool_destroy(rds_ibdev->rid_hdrs_pool);
+ dma_pool_destroy(rds_ibdev->rid_hdrs_pool);
list_for_each_entry_safe(i_ipaddr, i_next, &rds_ibdev->ipaddr_list, list) {
list_del(&i_ipaddr->list);