Commit 3ff810b9 authored by Ma Ke's avatar Ma Ke Committed by Mark Brown

ASoC: rt5682s: Return devm_of_clk_add_hw_provider to transfer the error

Return devm_of_clk_add_hw_provider() in order to transfer the error, if it
fails due to resource allocation failure or device tree clock provider
registration failure.

Fixes: bdd229ab ("ASoC: rt5682s: Add driver for ALC5682I-VS codec")
Signed-off-by: default avatarMa Ke <make24@iscas.ac.cn>
Link: https://patch.msgid.link/20240717115436.3449492-1-make24@iscas.ac.cnSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8716bd24
......@@ -2828,7 +2828,9 @@ static int rt5682s_register_dai_clks(struct snd_soc_component *component)
}
if (dev->of_node) {
devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, dai_clk_hw);
ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, dai_clk_hw);
if (ret)
return ret;
} else {
ret = devm_clk_hw_register_clkdev(dev, dai_clk_hw,
init.name, dev_name(dev));
......
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