Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01631243 authored by Tomoya MORINAGA's avatar Tomoya MORINAGA Committed by Vinod Koul
Browse files

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: default avatarTomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@linux.intel.com>
parent c43f1508
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -872,8 +872,7 @@ static int __devinit pch_dma_probe(struct pci_dev *pdev,
	int i;

	nr_channels = id->driver_data;
	pd = kzalloc(sizeof(struct pch_dma)+
		sizeof(struct pch_dma_chan) * nr_channels, GFP_KERNEL);
	pd = kzalloc(sizeof(*pd), GFP_KERNEL);
	if (!pd)
		return -ENOMEM;