[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1546059926-97458-1-git-send-email-peng.hao2@zte.com.cn>
Date: Sat, 29 Dec 2018 13:05:26 +0800
From: Peng Hao <peng.hao2@....com.cn>
To: linux@...linux.org.uk
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Peng Hao <peng.hao2@....com.cn>
Subject: [PATCH 1/2] arm/common/dmabounce : NULL check before dma_pool_destroy
NULL check before dma_pool_destroy is unnecessary because
there is a NULL check in dma_pool_destroy.
Signed-off-by: Peng Hao <peng.hao2@....com.cn>
---
arch/arm/common/dmabounce.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c
index 9a92de6..dcdd80c 100644
--- a/arch/arm/common/dmabounce.c
+++ b/arch/arm/common/dmabounce.c
@@ -569,10 +569,8 @@ void dmabounce_unregister_dev(struct device *dev)
BUG();
}
- if (device_info->small.pool)
- dma_pool_destroy(device_info->small.pool);
- if (device_info->large.pool)
- dma_pool_destroy(device_info->large.pool);
+ dma_pool_destroy(device_info->small.pool);
+ dma_pool_destroy(device_info->large.pool);
#ifdef STATS
if (device_info->attr_res == 0)
--
1.8.3.1
Powered by blists - more mailing lists