Thread (1 message) 1 message, 1 author, 2015-11-25

Re: [PATCH] ixp4xx_eth: Delete an unnecessary check before the function call "dma_pool_destroy"

From: khalasa@piap.pl (Krzysztof Hałasa)
Date: 2015-11-25 12:19:16
Also in: kernel-janitors, lkml

SF Markus Elfring [off-list ref] writes:
The dma_pool_destroy() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.
quoted hunk
--- a/drivers/net/ethernet/xscale/ixp4xx_eth.c
+++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c
@@ -1192,7 +1192,7 @@ static void destroy_queues(struct port *port)
 		port->desc_tab = NULL;
 	}
 
-	if (!ports_open && dma_pool) {
+	if (!ports_open) {
 		dma_pool_destroy(dma_pool);
 		dma_pool = NULL;
 	}
Acked-by: Krzysztof Halasa <khalasa@piap.pl>
-- 
Krzysztof Halasa

Industrial Research Institute for Automation and Measurements PIAP
Al. Jerozolimskie 202, 02-486 Warsaw, Poland
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help