Skip to content

Commit 76f5aaa

Browse files
andy-shevbroonie
authored andcommitted
ASoC: soc-ac97: Return correct error codes
With the switching to dev_err_probe(), during the conversion of GPIO calls, the return code is passed is a paratemer to it. At the same time a copy'n'paste mistake was made, so the wrong variable has been taken for the error reporting. Fix this. Fixes: 3ee0d39 ("ASoC: soc-ac97: Convert to agnostic GPIO API") Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent fdff966 commit 76f5aaa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/soc/soc-ac97.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,12 +336,12 @@ static int snd_soc_ac97_parse_pinctl(struct device *dev,
336336

337337
cfg->sdata_gpio = devm_gpiod_get_index(dev, "ac97", 1, GPIOD_ASIS);
338338
if (IS_ERR(cfg->sdata_gpio))
339-
return dev_err_probe(dev, PTR_ERR(cfg->sync_gpio), "Can't find ac97-sdata gpio\n");
339+
return dev_err_probe(dev, PTR_ERR(cfg->sdata_gpio), "Can't find ac97-sdata gpio\n");
340340
gpiod_set_consumer_name(cfg->sdata_gpio, "AC97 link sdata");
341341

342342
cfg->reset_gpio = devm_gpiod_get_index(dev, "ac97", 2, GPIOD_ASIS);
343343
if (IS_ERR(cfg->reset_gpio))
344-
return dev_err_probe(dev, PTR_ERR(cfg->sync_gpio), "Can't find ac97-reset gpio\n");
344+
return dev_err_probe(dev, PTR_ERR(cfg->reset_gpio), "Can't find ac97-reset gpio\n");
345345
gpiod_set_consumer_name(cfg->reset_gpio, "AC97 link reset");
346346

347347
return 0;

0 commit comments

Comments
 (0)