diff options
author | Venkata Prasad Potturu <venkataprasad.potturu@amd.com> | 2025-04-25 11:31:40 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-05-09 09:50:39 +0200 |
commit | 3104b7d559ffb28f34e55028ff55a475e26e2e1e (patch) | |
tree | 529dbdc6a3842936694ea80de9bafd2ef1229a27 | |
parent | 92d812df3b214a2a31d5449ce0028ffa7d0a0ed4 (diff) |
ASoC: amd: acp: Fix NULL pointer deref in acp_i2s_set_tdm_slot
[ Upstream commit 6d9b64156d849e358cb49b6b899fb0b7d262bda8 ]
Update chip data using dev_get_drvdata(dev->parent) to fix
NULL pointer deref in acp_i2s_set_tdm_slot.
Fixes: cd60dec8994c ("ASoC: amd: acp: Refactor TDM slots selction based on acp revision id")
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://patch.msgid.link/20250425060144.1773265-2-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | sound/soc/amd/acp/acp-i2s.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/amd/acp/acp-i2s.c b/sound/soc/amd/acp/acp-i2s.c index 92c5ff0deea2..607a3eaeb6da 100644 --- a/sound/soc/amd/acp/acp-i2s.c +++ b/sound/soc/amd/acp/acp-i2s.c @@ -101,7 +101,7 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mas struct acp_stream *stream; int slot_len, no_of_slots; - chip = dev_get_platdata(dev); + chip = dev_get_drvdata(dev->parent); switch (slot_width) { case SLOT_WIDTH_8: slot_len = 8; |