From: "Thomas Hämmerle" <Thomas.Haemmerle@wolfvision.net>
To: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Cc: "Thomas Hämmerle" <Thomas.Haemmerle@wolfvision.net>
Subject: [PATCH 4/6] macb: fix memory leakage due to double allocation of rx_buffer
Date: Tue, 8 Jan 2019 14:35:50 +0000 [thread overview]
Message-ID: <1546958133-6556-4-git-send-email-thomas.haemmerle@wolfvision.net> (raw)
In-Reply-To: <1546958133-6556-1-git-send-email-thomas.haemmerle@wolfvision.net>
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@wolfvision.net>
---
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@wolfvision.net
Webpage: www.wolfvision.com | www.wolfvision.com/green
Firmenbuch / Commercial Register: FN283521v Feldkirch/Austria
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-01-08 14:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <afd44571-b69b-41cc-bf15-9eff29f89a72.95bf7d06-047e-438c-8c7b-895af195351a.c64368fe-8a97-44b6-81ce-d981799f53c2@emailsignatures365.codetwo.com>
2019-01-08 14:35 ` [PATCH 1/6] dp83867: port from linux Thomas Hämmerle
[not found] ` <afd44571-b69b-41cc-bf15-9eff29f89a72.95bf7d06-047e-438c-8c7b-895af195351a.2f59ab5f-ece6-4f67-bfed-5c6c80a92f11@emailsignatures365.codetwo.com>
2019-01-08 14:35 ` [PATCH 2/6] macb: fix format specifiers for debug output Thomas Hämmerle
[not found] ` <afd44571-b69b-41cc-bf15-9eff29f89a72.95bf7d06-047e-438c-8c7b-895af195351a.e3a33094-2d73-4d32-bde8-2dc1ddd31fbf@emailsignatures365.codetwo.com>
2019-01-08 14:35 ` [PATCH 3/6] macb: fix check if hw is gem Thomas Hämmerle
[not found] ` <afd44571-b69b-41cc-bf15-9eff29f89a72.95bf7d06-047e-438c-8c7b-895af195351a.d7953183-96ef-4a79-9c25-4e47b7b852de@emailsignatures365.codetwo.com>
2019-01-08 14:35 ` Thomas Hämmerle [this message]
[not found] ` <afd44571-b69b-41cc-bf15-9eff29f89a72.95bf7d06-047e-438c-8c7b-895af195351a.365885ea-854d-40ae-9139-9d74dd250caf@emailsignatures365.codetwo.com>
2019-01-08 14:35 ` [PATCH 5/6] macb: disable second priority queue for zynqmp gem support Thomas Hämmerle
[not found] ` <afd44571-b69b-41cc-bf15-9eff29f89a72.95bf7d06-047e-438c-8c7b-895af195351a.d8af94ec-04db-4c9a-8f5a-ca89336b761c@emailsignatures365.codetwo.com>
2019-01-08 14:36 ` [PATCH 6/6] zynqmp: enable macb Ethernet support Thomas Hämmerle
2019-01-09 7:22 ` [PATCH 1/6] dp83867: port from linux Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1546958133-6556-4-git-send-email-thomas.haemmerle@wolfvision.net \
--to=thomas.haemmerle@wolfvision.net \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox