Netdev List
 help / color / mirror / Atom feed
* [patch] cxgb4: allocate enough data in t4_memory_rw()
@ 2012-10-08  7:12 Dan Carpenter
  2012-10-08  7:13 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-10-08  7:12 UTC (permalink / raw)
  To: Dimitris Michailidis, Vipul Pandya; +Cc: netdev, kernel-janitors

MEMWIN0_APERTURE is the size in bytes.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
This was introduced in 8c357ebd569 "cxgb4: Dynamically allocate memory
in t4_memory_rw() and get_vpd_params()" from Oct 3.

diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
index 137a244..e914c41 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
@@ -417,7 +417,7 @@ static int t4_memory_rw(struct adapter *adap, int mtype, u32 addr, u32 len,
 	if ((addr & 0x3) || (len & 0x3))
 		return -EINVAL;
 
-	data = vmalloc(MEMWIN0_APERTURE/sizeof(__be32));
+	data = vmalloc(MEMWIN0_APERTURE);
 	if (!data)
 		return -ENOMEM;
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-08  7:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-08  7:12 [patch] cxgb4: allocate enough data in t4_memory_rw() Dan Carpenter
2012-10-08  7:13 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox