Unverified Commit 6d9b6415 authored by Venkata Prasad Potturu's avatar Venkata Prasad Potturu Committed by Mark Brown
Browse files

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: cd60dec8 ("ASoC: amd: acp: Refactor TDM slots selction based on acp revision id")

Signed-off-by: default avatarVenkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://patch.msgid.link/20250425060144.1773265-2-venkataprasad.potturu@amd.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent ba85883d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,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;