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)
committerMark Brown <broonie@kernel.org>
Mon, 15 Sep 2025 11:49:11 +0000 (12:49 +0100)
commitd7871f400cad1da376f1d7724209a1c49226c456
tree499dfa8d038e48bd0bbe20f5f71fe4b66590ee24
parent73caf2bcf3f0a3843c091b78b0711e356f8a2ef9
ASoC: amd: acp: Fix incorrect retrival of acp_chip_info

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>
sound/soc/amd/acp/acp-i2s.c