Skip to content

Commit

Permalink
cxgb4: allocate enough data in t4_memory_rw()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Oct 8, 2012
1 parent 9545f4e commit 594f88e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 594f88e

Please sign in to comment.