提交 01631243 编写于 作者: T Tomoya MORINAGA 提交者: Vinod Koul

pch_dma: Reduce wasting memory

nr_channels is defined in "struct pch_dma".
and struct pch_dma_chan is defined in "struct pch_dma".
So, "sizeof(struct pch_dma_chan) * nr_channels" is unnecessary.
Signed-off-by: NTomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com>
Signed-off-by: NVinod Koul <vinod.koul@linux.intel.com>
上级 c43f1508
...@@ -872,8 +872,7 @@ static int __devinit pch_dma_probe(struct pci_dev *pdev, ...@@ -872,8 +872,7 @@ static int __devinit pch_dma_probe(struct pci_dev *pdev,
int i; int i;
nr_channels = id->driver_data; nr_channels = id->driver_data;
pd = kzalloc(sizeof(struct pch_dma)+ pd = kzalloc(sizeof(*pd), GFP_KERNEL);
sizeof(struct pch_dma_chan) * nr_channels, GFP_KERNEL);
if (!pd) if (!pd)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册