]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: amd: acp: Fix incorrect retrival of acp_chip_info
authorVenkata Prasad Potturu <venkataprasad.potturu@amd.com>
Wed, 10 Sep 2025 17:13:59 +0000 (22:43 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Sep 2025 09:16:51 +0000 (11:16 +0200)
commit65c5cfbd6d938f77a0df3c34855a4f7d8a61fd10
treebac17e20c064c666bce58e2ce5990b24694914ea
parentf7229775e41d0c43db3639a6b520db9924f027ae
ASoC: amd: acp: Fix incorrect retrival of acp_chip_info

[ Upstream commit d7871f400cad1da376f1d7724209a1c49226c456 ]

Use dev_get_drvdata(dev->parent) instead of dev_get_platdata(dev)
to correctly obtain acp_chip_info members in the acp I2S driver.
Previously, some members were not updated properly due to incorrect
data access, which could potentially lead to null pointer
dereferences.

This issue was missed in the earlier commit
("ASoC: amd: acp: Fix NULL pointer deref in acp_i2s_set_tdm_slot"),
which only addressed set_tdm_slot(). This change ensures that all
relevant functions correctly retrieve acp_chip_info, preventing
further null pointer dereference issues.

Fixes: e3933683b25e ("ASoC: amd: acp: Remove redundant acp_dev_data structure")
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250910171419.3682468-1-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/amd/acp/acp-i2s.c