diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-10-08 09:12:11 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-10-08 09:13:16 +0200 |
commit | 594f88e96ebaf290e6509b37fff84b310ec1f155 (patch) | |
tree | 82811ec3e1ea31a63315a3b51652ee7f84c542e3 | |
parent | ptp: use list_move instead of list_del/list_add (diff) | |
download | linux-594f88e96ebaf290e6509b37fff84b310ec1f155.tar.xz linux-594f88e96ebaf290e6509b37fff84b310ec1f155.zip |
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>
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 |
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 137a24438d9c..e914c4113b8d 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; |