mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
ASoC: amd: acp: Fix NULL pointer deref on acp resume path
update chip data using dev_get_drvdata(dev->parent) instead of
dev_get_platdata(dev).
BUG: kernel NULL pointer dereference, address: 0000000000000010
Call Trace:
<TASK>
? __pfx_platform_pm_resume+0x10/0x10
platform_pm_resume+0x28/0x60
dpm_run_callback+0x51/0x1a0
device_resume+0x1a6/0x2b0
dpm_resume+0x168/0x230
Fixes: e3933683b2 ("ASoC: amd: acp: Remove redundant acp_dev_data structure")
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://patch.msgid.link/20250425060144.1773265-1-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
c1b0f5183a
commit
ba85883d16
|
|
@ -199,7 +199,7 @@ static void rembrandt_audio_remove(struct platform_device *pdev)
|
|||
|
||||
static int rmb_pcm_resume(struct device *dev)
|
||||
{
|
||||
struct acp_chip_info *chip = dev_get_platdata(dev);
|
||||
struct acp_chip_info *chip = dev_get_drvdata(dev->parent);
|
||||
struct acp_stream *stream;
|
||||
struct snd_pcm_substream *substream;
|
||||
snd_pcm_uframes_t buf_in_frames;
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ static void renoir_audio_remove(struct platform_device *pdev)
|
|||
|
||||
static int rn_pcm_resume(struct device *dev)
|
||||
{
|
||||
struct acp_chip_info *chip = dev_get_platdata(dev);
|
||||
struct acp_chip_info *chip = dev_get_drvdata(dev->parent);
|
||||
struct acp_stream *stream;
|
||||
struct snd_pcm_substream *substream;
|
||||
snd_pcm_uframes_t buf_in_frames;
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ static void acp63_audio_remove(struct platform_device *pdev)
|
|||
|
||||
static int acp63_pcm_resume(struct device *dev)
|
||||
{
|
||||
struct acp_chip_info *chip = dev_get_platdata(dev);
|
||||
struct acp_chip_info *chip = dev_get_drvdata(dev->parent);
|
||||
struct acp_stream *stream;
|
||||
struct snd_pcm_substream *substream;
|
||||
snd_pcm_uframes_t buf_in_frames;
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ static void acp_acp70_audio_remove(struct platform_device *pdev)
|
|||
|
||||
static int acp70_pcm_resume(struct device *dev)
|
||||
{
|
||||
struct acp_chip_info *chip = dev_get_platdata(dev);
|
||||
struct acp_chip_info *chip = dev_get_drvdata(dev->parent);
|
||||
struct acp_stream *stream;
|
||||
struct snd_pcm_substream *substream;
|
||||
snd_pcm_uframes_t buf_in_frames;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user