diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2022-04-03 08:58:27 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-04-08 15:43:55 +0100 |
commit | ddfd534528146660de75ee84d6db10f10e778f95 (patch) | |
tree | a94f62db89c83ecb7e30d557a1e59dc15a2aa33f /sound/soc/codecs/lpass-va-macro.c | |
parent | aa70527d36d74db80a1c40e792f5320ab56e6eae (diff) | |
download | lwn-ddfd534528146660de75ee84d6db10f10e778f95.tar.gz lwn-ddfd534528146660de75ee84d6db10f10e778f95.zip |
ASoC: codecs: Fix an error handling path in (rx|tx|va)_macro_probe()
After a successful lpass_macro_pds_init() call, lpass_macro_pds_exit() must
be called.
Add the missing call in the error handling path of the probe function and
use it.
Fixes: 9e3d83c52844 ("ASoC: codecs: Add power domains support in digital macro codecs")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/5b5a015a9b1dc8011c6a4053fa49da1f2531e47c.1648969065.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/lpass-va-macro.c')
-rw-r--r-- | sound/soc/codecs/lpass-va-macro.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c index f3cb596058e0..d18b56e60433 100644 --- a/sound/soc/codecs/lpass-va-macro.c +++ b/sound/soc/codecs/lpass-va-macro.c @@ -1434,8 +1434,10 @@ static int va_macro_probe(struct platform_device *pdev) va->dmic_clk_div = VA_MACRO_CLK_DIV_2; } else { ret = va_macro_validate_dmic_sample_rate(sample_rate, va); - if (!ret) - return -EINVAL; + if (!ret) { + ret = -EINVAL; + goto err; + } } base = devm_platform_ioremap_resource(pdev, 0); @@ -1492,6 +1494,8 @@ err_mclk: err_dcodec: clk_disable_unprepare(va->macro); err: + lpass_macro_pds_exit(va->pds); + return ret; } |