From: Dan Carpenter Date: Mon, 8 Oct 2012 07:12:11 +0000 (+0300) Subject: cxgb4: allocate enough data in t4_memory_rw() X-Git-Tag: upstream/snapshot3+hdmi~6486^2~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=594f88e96ebaf290e6509b37fff84b310ec1f155;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git cxgb4: allocate enough data in t4_memory_rw() MEMWIN0_APERTURE is the size in bytes. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c index 137a244..e914c41 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;