Return-Path: Received: from omzsmtpe03.verizonbusiness.com ([199.249.25.208]:32009 "EHLO omzsmtpe03.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753123AbdLMB6R (ORCPT ); Tue, 12 Dec 2017 20:58:17 -0500 From: alexander.levin@verizon.com Cc: Arnaud Pouliquen , Mark Brown , alexander.levin@verizon.com To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 4.9 038/100] ASoC: STI: Fix reader substream pointer set Date: Wed, 13 Dec 2017 01:57:31 +0000 Message-ID: <20171213015722.6722-13-alexander.levin@verizon.com> References: <20171213015722.6722-1-alexander.levin@verizon.com> In-Reply-To: <20171213015722.6722-1-alexander.levin@verizon.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Arnaud Pouliquen [ Upstream commit 3c9d3f1bc2defd418b5933bbc928096c9c686d3b ] reader->substream is used in IRQ handler for error case but is never set. Set value to pcm substream on DAI startup and clean it on dai shutdown. Signed-off-by: Arnaud Pouliquen Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/sti/uniperif_reader.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/sti/uniperif_reader.c b/sound/soc/sti/uniperif_reade= r.c index 0e1c3ee56675..9735b4caaed3 100644 --- a/sound/soc/sti/uniperif_reader.c +++ b/sound/soc/sti/uniperif_reader.c @@ -364,6 +364,8 @@ static int uni_reader_startup(struct snd_pcm_substream = *substream, struct uniperif *reader =3D priv->dai_data.uni; int ret; =20 + reader->substream =3D substream; + if (!UNIPERIF_TYPE_IS_TDM(reader)) return 0; =20 @@ -393,6 +395,7 @@ static void uni_reader_shutdown(struct snd_pcm_substrea= m *substream, /* Stop the reader */ uni_reader_stop(reader); } + reader->substream =3D NULL; } =20 static const struct snd_soc_dai_ops uni_reader_dai_ops =3D { --=20 2.11.0