diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2022-07-12 16:42:12 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-07-13 14:48:53 +0200 |
commit | 73acfba792b06156b7c805162fcd89fdb71646f9 (patch) | |
tree | 1ca63377fc23787a06bc567fbc512f50c341d3b9 | |
parent | ASoC: SOF: Intel: hda: Correct Firmware State Register use (diff) | |
download | linux-73acfba792b06156b7c805162fcd89fdb71646f9.tar.xz linux-73acfba792b06156b7c805162fcd89fdb71646f9.zip |
ASoC: amd: Fix error pointer dereference
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>
Link: https://lore.kernel.org/r/Ys2IRPHWGIwuVs21@kili
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/amd/acp-es8336.c | 1 |
1 files changed, 0 insertions, 1 deletions
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; } |