Skip to contentSkip to conversation

arm: remove NULL check before some freeing functions

PATCH New Jason Yan 1 participant 1 message Apr 18, 2020 Arm (32-bit)

lore
Share & tools
lore

Jason Yan

author
#0 lore raw

PATCH 1/1 arm: remove NULL check before some freeing functions

Fix the following coccicheck warning:

arch/arm/common/dmabounce.c:564:2-18: WARNING: NULL check before some freeing functions is not needed. arch/arm/common/dmabounce.c:566:2-18: WARNING: NULL check before some freeing functions is not needed.

---
 arch/arm/common/dmabounce.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
arch/arm/common/dmabounce.c +2 -4
index f4b719bde763..a7c776cdc38f 100644
@@ -560,10 +560,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)
Signature · 1 line
2.21.1