[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1528354129-5023-1-git-send-email-akshu.agrawal@amd.com>
Date: Thu, 7 Jun 2018 14:48:43 +0800
From: Akshu Agrawal <akshu.agrawal@....com>
To: unlisted-recipients:; (no To-header on input)
Cc: djkurtz@...omium.org, akshu.agrawal@....com,
Alexander.Deucher@....com, Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
"Mukunda, Vijendar" <Vijendar.Mukunda@....com>,
Alex Deucher <alexander.deucher@....com>,
Guenter Roeck <linux@...ck-us.net>,
alsa-devel@...a-project.org (moderated list:SOUND - SOC LAYER / DYNAMIC
AUDIO POWER MANAGEM...), linux-kernel@...r.kernel.org (open list)
Subject: [PATCH 1/2] ASoC: AMD: Add NULL pointer check
Fix crash in those platforms whose machine driver does not expose
platform_info. For those platforms we rely on default value and
select I2SSP channel.
Signed-off-by: Akshu Agrawal <akshu.agrawal@....com>
---
sound/soc/amd/acp-pcm-dma.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c
index 7720384..1458b50 100644
--- a/sound/soc/amd/acp-pcm-dma.c
+++ b/sound/soc/amd/acp-pcm-dma.c
@@ -773,7 +773,8 @@ static int acp_dma_hw_params(struct snd_pcm_substream *substream,
if (WARN_ON(!rtd))
return -EINVAL;
- rtd->i2s_instance = pinfo->i2s_instance;
+ if (pinfo)
+ rtd->i2s_instance = pinfo->i2s_instance;
if (adata->asic_type == CHIP_STONEY) {
val = acp_reg_read(adata->acp_mmio,
mmACP_I2S_16BIT_RESOLUTION_EN);
--
1.9.1
Powered by blists - more mailing lists