[PATCH 4/6] macb: fix memory leakage due to double allocation of rx_buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remove memory allocation of rx buffer in function
macb_init_rx_buffer_size, which caused a memory leak since it also is
alocated in macb_probe().

Signed-off-by: Thomas Haemmerle <thomas.haemmerle@xxxxxxxxxxxxxx>
---
 drivers/net/macb.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index c776535..c129282 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -592,8 +592,6 @@ static void macb_init_rx_buffer_size(struct macb_device *bp, size_t size)
 			bp->rx_buffer_size =
 				roundup(bp->rx_buffer_size, RX_BUFFER_MULTIPLE);
 		}
-		bp->rx_buffer = dma_alloc_coherent(bp->rx_buffer_size * bp->rx_ring_size,
-						   DMA_ADDRESS_BROKEN);
 	}
 
 	dev_dbg(bp->dev, "[%zu] rx_buffer_size [%d]\n",
-- 
2.7.4


Thomas Hämmerle
Research and Development 

Wolfvision GmbH
 | 6833 Klaus | Austria 
Tel: +43 5523 52250 | Mail: Thomas.Haemmerle@xxxxxxxxxxxxxx 

Webpage: www.wolfvision.com | www.wolfvision.com/green
Firmenbuch / Commercial Register: FN283521v Feldkirch/Austria


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux