mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-27 06:34:11 +08:00
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>
This commit is contained in:
parent
9545f4e2be
commit
594f88e96e
@ -417,7 +417,7 @@ static int t4_memory_rw(struct adapter *adap, int mtype, u32 addr, u32 len,
|
|||||||
if ((addr & 0x3) || (len & 0x3))
|
if ((addr & 0x3) || (len & 0x3))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
data = vmalloc(MEMWIN0_APERTURE/sizeof(__be32));
|
data = vmalloc(MEMWIN0_APERTURE);
|
||||||
if (!data)
|
if (!data)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user