From: Lars-Peter Clausen Subject: [PATCH 02/11] ASoC: mpc5200_dma: Don't overwrite ac97 device private_data Date: Mon, 10 Nov 2014 22:41:44 +0100 Message-ID: <1415655713-29842-3-git-send-email-lars@metafoo.de> References: <1415655713-29842-1-git-send-email-lars@metafoo.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from smtp-out-111.synserver.de (smtp-out-111.synserver.de [212.40.185.111]) by alsa0.perex.cz (Postfix) with ESMTP id 752372619F5 for ; Mon, 10 Nov 2014 22:48:58 +0100 (CET) In-Reply-To: <1415655713-29842-1-git-send-email-lars@metafoo.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Mark Brown , Liam Girdwood Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen , Stephen Warren , Sangbeom Kim , patches@opensource.wolfsonmicro.com, Timur Tabi , Nicolin Chen , Xiubo Li , Markus Pargmann , Charles Keepax List-Id: alsa-devel@alsa-project.org 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 --- sound/soc/fsl/mpc5200_dma.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c index f2b5d75..0b82e20 100644 --- a/sound/soc/fsl/mpc5200_dma.c +++ b/sound/soc/fsl/mpc5200_dma.c @@ -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: -- 1.8.0