Skip to contentSkip to conversation

ASoC: soc-ac97: fix wrong pointer pass to PTR_ERR()

PATCH In review Yang Yingliang 2 participants 2 messages Feb 17, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: soc-ac97: fix wrong pointer pass to PTR_ERR()

Fix wrong pointer pass to PTR_ERR() if devm_gpiod_get_index() fails.

Fixes 3ee0d39c50dc ("ASoC: soc-ac97: Convert to agnostic GPIO API")
---
 sound/soc/soc-ac97.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/soc-ac97.c +2 -2
index 40051f513c6a..4e4fe29ade50 100644
@@ -336,12 +336,12 @@ static int snd_soc_ac97_parse_pinctl(struct device *dev,
 
 	cfg->sdata_gpio = devm_gpiod_get_index(dev, "ac97", 1, GPIOD_ASIS);
 	if (IS_ERR(cfg->sdata_gpio))
-		return dev_err_probe(dev, PTR_ERR(cfg->sync_gpio), "Can't find ac97-sdata gpio\n");
+		return dev_err_probe(dev, PTR_ERR(cfg->sdata_gpio), "Can't find ac97-sdata gpio\n");
 	gpiod_set_consumer_name(cfg->sdata_gpio, "AC97 link sdata");
 
 	cfg->reset_gpio = devm_gpiod_get_index(dev, "ac97", 2, GPIOD_ASIS);
 	if (IS_ERR(cfg->reset_gpio))
-		return dev_err_probe(dev, PTR_ERR(cfg->sync_gpio), "Can't find ac97-reset gpio\n");
+		return dev_err_probe(dev, PTR_ERR(cfg->reset_gpio), "Can't find ac97-reset gpio\n");
 	gpiod_set_consumer_name(cfg->reset_gpio, "AC97 link reset");
 
 	return 0;
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 1 line · Yang Yingliang

Fix wrong pointer pass to PTR_ERR() if devm_gpiod_get_index() fails.

This was already fixed by Andy, thanks.