Commit 251e5c86 authored by Matthias Schiffer's avatar Matthias Schiffer Committed by Mark Brown

ASoC: codec: tlv320aic32x4: fix missing aic32x4_disable_regulators() in error path

The regulators need to be disabled in the aic32x4_register_clocks()
failure case as well.

Fixes: 9d4befff ("ASoC: codec: tlv3204: Moving GPIO reset and add ADC reset")
Signed-off-by: default avatarMatthias Schiffer <matthias.schiffer@ew.tq-group.com>
Link: https://lore.kernel.org/r/20200902133043.19504-1-matthias.schiffer@ew.tq-group.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent abe42b09
...@@ -1230,8 +1230,7 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap) ...@@ -1230,8 +1230,7 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap)
&soc_component_dev_aic32x4, &aic32x4_dai, 1); &soc_component_dev_aic32x4, &aic32x4_dai, 1);
if (ret) { if (ret) {
dev_err(dev, "Failed to register component\n"); dev_err(dev, "Failed to register component\n");
aic32x4_disable_regulators(aic32x4); goto err_disable_regulators;
return ret;
} }
if (gpio_is_valid(aic32x4->rstn_gpio)) { if (gpio_is_valid(aic32x4->rstn_gpio)) {
...@@ -1242,9 +1241,14 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap) ...@@ -1242,9 +1241,14 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap)
ret = aic32x4_register_clocks(dev, aic32x4->mclk_name); ret = aic32x4_register_clocks(dev, aic32x4->mclk_name);
if (ret) if (ret)
return ret; goto err_disable_regulators;
return 0; return 0;
err_disable_regulators:
aic32x4_disable_regulators(aic32x4);
return ret;
} }
EXPORT_SYMBOL(aic32x4_probe); EXPORT_SYMBOL(aic32x4_probe);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment