ASoC: codecs: wsa883x: Shutdown on error path

If probe fails, toggle shutdown via GPIO to save power and reverse
probe actions.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221109163759.1158837-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Krzysztof Kozlowski 2022-11-09 17:37:58 +01:00 committed by Mark Brown
parent 7d95977533
commit 8e02238744
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -1415,6 +1415,7 @@ static int wsa883x_probe(struct sdw_slave *pdev,
wsa883x->regmap = devm_regmap_init_sdw(pdev, &wsa883x_regmap_config);
if (IS_ERR(wsa883x->regmap)) {
gpiod_direction_output(wsa883x->sd_n, 1);
dev_err(&pdev->dev, "regmap_init failed\n");
ret = PTR_ERR(wsa883x->regmap);
goto err;