Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 6e56e5d0 authored by Agrawal, Akshu's avatar Agrawal, Akshu Committed by Mark Brown
Browse files

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: default avatarAkshu Agrawal <akshu.agrawal@amd.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 203cdf51
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -773,6 +773,7 @@ static int acp_dma_hw_params(struct snd_pcm_substream *substream,
	if (WARN_ON(!rtd))
		return -EINVAL;

	if (pinfo)
		rtd->i2s_instance = pinfo->i2s_instance;
	if (adata->asic_type == CHIP_STONEY) {
		val = acp_reg_read(adata->acp_mmio,