aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVijendar Mukunda <[email protected]>2022-07-07 18:56:10 +0530
committerMark Brown <[email protected]>2022-07-08 11:51:50 +0100
commit0de876c125188e502d2899de4bcba8d4a6b1f98c (patch)
tree11d906163046922a79b8eb0e924aaee81451ae46
parent8d9cd3ead42a6d3bac131c4331acfa5244674fbb (diff)
ASoC: amd: fix for variable set but not used warning
Fix below kernel warning. >>> sound/soc/amd/acp-es8336.c:200:13: warning: variable 'ret' set but >>> not used [-Wunused-but-set-variable] Signed-off-by: Vijendar Mukunda <[email protected]> Reported-by: kernel test robot <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/amd/acp-es8336.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/amd/acp-es8336.c b/sound/soc/amd/acp-es8336.c
index a9997627f991..ebd4fa9f1f00 100644
--- a/sound/soc/amd/acp-es8336.c
+++ b/sound/soc/amd/acp-es8336.c
@@ -206,6 +206,8 @@ static int st_es8336_late_probe(struct snd_soc_card *card)
dev_err(card->dev, "can not find codec dev\n");
ret = devm_acpi_dev_add_driver_gpios(codec_dev, acpi_es8336_gpios);
+ if (ret)
+ dev_warn(card->dev, "Failed to add driver gpios\n");
gpio_pa = gpiod_get_optional(codec_dev, "pa-enable", GPIOD_OUT_LOW);
if (IS_ERR(gpio_pa)) {
@@ -213,6 +215,7 @@ static int st_es8336_late_probe(struct snd_soc_card *card)
"could not get pa-enable GPIO\n");
gpiod_put(gpio_pa);
put_device(codec_dev);
+ return ret;
}
return 0;
}