summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/chelsio
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-10-08 10:12:11 +0300
committerDavid S. Miller <davem@davemloft.net>2012-10-08 03:13:16 -0400
commit594f88e96ebaf290e6509b37fff84b310ec1f155 (patch)
tree82811ec3e1ea31a63315a3b51652ee7f84c542e3 /drivers/net/ethernet/chelsio
parent9545f4e2beb1b4faae5b57250f18b0047fa191fc (diff)
cxgb4: allocate enough data in t4_memory_rw()
MEMWIN0_APERTURE is the size in bytes. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/t4_hw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
index 137a24438d9..e914c4113b8 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;