提交 594f88e9 编写于 作者: D Dan Carpenter 提交者: David S. Miller

cxgb4: allocate enough data in t4_memory_rw()

MEMWIN0_APERTURE is the size in bytes.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9545f4e2
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册