* [PATCH] ASoC: amd: Fix error pointer dereference
@ 2022-07-12 14:42 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2022-07-12 14:42 UTC (permalink / raw)
To: Liam Girdwood
Cc: alsa-devel, kernel-janitors, Pierre-Louis Bossart, Takashi Iwai,
Mark Brown, Yang Li, Vijendar Mukunda
The "gpio_pa" pointer is an error pointer, there is no need to try
put it. Calling gpiod_put() on it will lead to an error pointer
dereference.
Fixes: 02527c3f2300 ("ASoC: amd: add Machine driver for Jadeite platform")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
sound/soc/amd/acp-es8336.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/soc/amd/acp-es8336.c b/sound/soc/amd/acp-es8336.c
index d501618b78f6..2fe8df86053a 100644
--- a/sound/soc/amd/acp-es8336.c
+++ b/sound/soc/amd/acp-es8336.c
@@ -212,7 +212,6 @@ static int st_es8336_late_probe(struct snd_soc_card *card)
if (IS_ERR(gpio_pa)) {
ret = dev_err_probe(card->dev, PTR_ERR(gpio_pa),
"could not get pa-enable GPIO\n");
- gpiod_put(gpio_pa);
put_device(codec_dev);
return ret;
}
--
2.35.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] ASoC: amd: Fix error pointer dereference
@ 2022-07-12 14:42 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2022-07-12 14:42 UTC (permalink / raw)
To: Liam Girdwood
Cc: Mark Brown, Jaroslav Kysela, Takashi Iwai, Vijendar Mukunda,
Yang Li, Pierre-Louis Bossart, alsa-devel, kernel-janitors
The "gpio_pa" pointer is an error pointer, there is no need to try
put it. Calling gpiod_put() on it will lead to an error pointer
dereference.
Fixes: 02527c3f2300 ("ASoC: amd: add Machine driver for Jadeite platform")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
sound/soc/amd/acp-es8336.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/soc/amd/acp-es8336.c b/sound/soc/amd/acp-es8336.c
index d501618b78f6..2fe8df86053a 100644
--- a/sound/soc/amd/acp-es8336.c
+++ b/sound/soc/amd/acp-es8336.c
@@ -212,7 +212,6 @@ static int st_es8336_late_probe(struct snd_soc_card *card)
if (IS_ERR(gpio_pa)) {
ret = dev_err_probe(card->dev, PTR_ERR(gpio_pa),
"could not get pa-enable GPIO\n");
- gpiod_put(gpio_pa);
put_device(codec_dev);
return ret;
}
--
2.35.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: amd: Fix error pointer dereference
2022-07-12 14:42 ` Dan Carpenter
@ 2022-07-13 14:30 ` Mark Brown
-1 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2022-07-13 14:30 UTC (permalink / raw)
To: Liam Girdwood, dan.carpenter
Cc: pierre-louis.bossart, alsa-devel, kernel-janitors, Takashi Iwai,
yang.lee, Vijendar.Mukunda
On Tue, 12 Jul 2022 17:42:12 +0300, Dan Carpenter wrote:
> The "gpio_pa" pointer is an error pointer, there is no need to try
> put it. Calling gpiod_put() on it will lead to an error pointer
> dereference.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: amd: Fix error pointer dereference
commit: 73acfba792b06156b7c805162fcd89fdb71646f9
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: amd: Fix error pointer dereference
@ 2022-07-13 14:30 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2022-07-13 14:30 UTC (permalink / raw)
To: Liam Girdwood, dan.carpenter
Cc: Takashi Iwai, yang.lee, alsa-devel, pierre-louis.bossart,
kernel-janitors, Jaroslav Kysela, Vijendar.Mukunda
On Tue, 12 Jul 2022 17:42:12 +0300, Dan Carpenter wrote:
> The "gpio_pa" pointer is an error pointer, there is no need to try
> put it. Calling gpiod_put() on it will lead to an error pointer
> dereference.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: amd: Fix error pointer dereference
commit: 73acfba792b06156b7c805162fcd89fdb71646f9
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-13 14:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-12 14:42 [PATCH] ASoC: amd: Fix error pointer dereference Dan Carpenter
2022-07-12 14:42 ` Dan Carpenter
2022-07-13 14:30 ` Mark Brown
2022-07-13 14:30 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.