Skip to content

Commit 6d9b641

Browse files
Venkata-Prasad-Potturubroonie
authored andcommitted
ASoC: amd: acp: Fix NULL pointer deref in acp_i2s_set_tdm_slot
Update chip data using dev_get_drvdata(dev->parent) to fix NULL pointer deref in acp_i2s_set_tdm_slot. Fixes: cd60dec ("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>
1 parent ba85883 commit 6d9b641

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/amd/acp/acp-i2s.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mas
9797
struct acp_stream *stream;
9898
int slot_len, no_of_slots;
9999

100-
chip = dev_get_platdata(dev);
100+
chip = dev_get_drvdata(dev->parent);
101101
switch (slot_width) {
102102
case SLOT_WIDTH_8:
103103
slot_len = 8;

0 commit comments

Comments
 (0)