ASoC: mpc5200_dma: Don't overwrite ac97 device private_data
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 10 Nov 2014 21:41:44 +0000 (22:41 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 18 Nov 2014 15:26:05 +0000 (15:26 +0000)
The mpc5200_dma overwrites the private_data field of the CODEC's AC'97
device with the DMA drivers private data, but never actually reads it again.
Given that the private_data field is supposed to be owned by the AC'97
driver, overwriting it may cause undefined behavior. This patch removes the
code that overwrites the field from the driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/mpc5200_dma.c

index f2b5d756b1f3360846ef3bb1f8f43a4efd8547b1..0b82e209b6e38d9a10723b5f27fb62af7f6481f1 100644 (file)
@@ -327,9 +327,6 @@ static int psc_dma_new(struct snd_soc_pcm_runtime *rtd)
                        goto capture_alloc_err;
        }
 
-       if (rtd->codec->ac97)
-               rtd->codec->ac97->private_data = psc_dma;
-
        return 0;
 
  capture_alloc_err: