Skip to contentSkip to conversation

ARM: dma-mapping: remove redundant NULL check

PATCH New Abaci Team 1 participant 1 message Jan 27, 2021 Arm (32-bit)

lore
Share & tools
lore

Abaci Team

author
#0 lore raw

PATCH 1/1 ARM: dma-mapping: remove redundant NULL check

Fix below warnings reported by coccicheck:
./arch/arm/common/dmabounce.c:565: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 7996c04..bf1218a 100644
@@ -561,10 +561,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 · 7 lines
1.8.3.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel