From: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
To: <broonie@kernel.org>, <alsa-devel@alsa-project.org>
Cc: <Vijendar.Mukunda@amd.com>, <Basavaraj.Hiregoudar@amd.com>,
<Sunil-kumar.Dommati@amd.com>, <syed.sabakareem@amd.com>,
<mario.limonciello@amd.com>,
Venkata Prasad Potturu <venkataprasad.potturu@amd.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Greg KH <gregkh@linuxfoundation.org>,
Jeff Johnson <quic_jjohnson@quicinc.com>,
Daniel Baluta <daniel.baluta@nxp.com>,
Peter Zijlstra <peterz@infradead.org>,
"open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..."
<linux-sound@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/3] ASoC: amd: acp: Fix NULL pointer deref in acp_i2s_set_tdm_slot
Date: Fri, 25 Apr 2025 11:31:40 +0530 [thread overview]
Message-ID: <20250425060144.1773265-2-venkataprasad.potturu@amd.com> (raw)
In-Reply-To: <20250425060144.1773265-1-venkataprasad.potturu@amd.com>
Update chip data using dev_get_drvdata(dev->parent) to fix
NULL pointer deref in acp_i2s_set_tdm_slot.
Fixes: cd60dec8994c ("ASoC: amd: acp: Refactor TDM slots selction based on acp revision id")
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
---
sound/soc/amd/acp/acp-i2s.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/amd/acp/acp-i2s.c b/sound/soc/amd/acp/acp-i2s.c
index a38409dd1d34..70fa54d568ef 100644
--- a/sound/soc/amd/acp/acp-i2s.c
+++ b/sound/soc/amd/acp/acp-i2s.c
@@ -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;
--
2.43.0
next prev parent reply other threads:[~2025-04-25 6:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-25 6:01 [PATCH 1/3] ASoC: amd: acp: Fix NULL pointer deref on acp resume path Venkata Prasad Potturu
2025-04-25 6:01 ` Venkata Prasad Potturu [this message]
2025-04-25 6:01 ` [PATCH 3/3] ASoC: amd: acp: Fix devm_snd_soc_register_card(acp-pdm-mach) failure Venkata Prasad Potturu
2025-04-25 8:55 ` [PATCH 1/3] ASoC: amd: acp: Fix NULL pointer deref on acp resume path Markus Elfring
2025-04-25 9:05 ` Greg Kroah-Hartman
2025-04-25 11:30 ` Mark Brown
2025-04-25 17:40 ` Mark Brown
2025-05-01 22:16 ` Niklas Schnelle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250425060144.1773265-2-venkataprasad.potturu@amd.com \
--to=venkataprasad.potturu@amd.com \
--cc=Basavaraj.Hiregoudar@amd.com \
--cc=Sunil-kumar.Dommati@amd.com \
--cc=Vijendar.Mukunda@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=daniel.baluta@nxp.com \
--cc=gregkh@linuxfoundation.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=perex@perex.cz \
--cc=peterz@infradead.org \
--cc=quic_jjohnson@quicinc.com \
--cc=syed.sabakareem@amd.com \
--cc=tiwai@suse.com \
--cc=yung-chuan.liao@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®