All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: AMD: Add NULL pointer check
@ 2018-06-07  6:48 ` Akshu Agrawal
  0 siblings, 0 replies; 12+ messages in thread
From: Akshu Agrawal @ 2018-06-07  6:48 UTC (permalink / raw)
  Cc: moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
	open list, Takashi Iwai, Liam Girdwood, djkurtz, Mark Brown,
	Mukunda, Vijendar, Alex Deucher, akshu.agrawal, Guenter Roeck

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@amd.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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-06-22 14:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-07  6:48 [PATCH 1/2] ASoC: AMD: Add NULL pointer check Akshu Agrawal
2018-06-07  6:48 ` Akshu Agrawal
2018-06-07  6:48 ` [v2, 2/2] ASoC: AMD: Configure channel 1 or channel 0 for capture Akshu Agrawal
2018-06-07  6:48   ` Akshu Agrawal
2018-06-20 14:02   ` Mark Brown
2018-06-20 14:02     ` Mark Brown
2018-06-21  4:48     ` Agrawal, Akshu
2018-06-21  4:48       ` Agrawal, Akshu
2018-06-22 14:50   ` Applied "ASoC: AMD: Configure channel 1 or channel 0 for capture" to the asoc tree Mark Brown
2018-06-22 14:50     ` Mark Brown
2018-06-18 12:00 ` Applied "ASoC: AMD: Add NULL pointer check" " Mark Brown
2018-06-18 12:00   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.