]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net/rds: Remove unnecessary null check
authorYueHaibing <yuehaibing@huawei.com>
Tue, 15 Oct 2019 11:47:36 +0000 (19:47 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Oct 2019 19:23:03 +0000 (15:23 -0400)
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>
net/rds/ib.c

index 62d4ebeb08c1c840333ab168cce3e04b93e19c6a..3fd5f40189bd4ed908c5baeea5e0d83dc121e9b5 100644 (file)
@@ -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);