Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: ES8389: convert to devm_clk_get_optional() to get clock

When enabling ES8390 via ACPI description, es8389 would fail to
obtain a clock source, causing the driver to fail to initialize.
This was not an issue with older kernels, but since commit
abae8e57e49a ("clk: generalize devm_clk_get() a bit"),
devm_clk_get() would return an error pointer when a clock source
was not detected (instead of falling back to a static clock),
causing the driver to fail early.

Use devm_clk_get_optional() instead to return to the previous
behaviour, allowing the use of a static clock source.

Cc: stable@vger.kernel.org
Signed-off-by: Li Jian <lazycat-xiao@foxmail.com>
Link: https://patch.msgid.link/tencent_7C78374FB9F4B3A37101E5C719715D8BC40A@qq.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Li Jian and committed by
Mark Brown
8ed33111 74c876bf

+1 -1
+1 -1
sound/soc/codecs/es8389.c
··· 892 892 return ret; 893 893 } 894 894 895 - es8389->mclk = devm_clk_get(component->dev, "mclk"); 895 + es8389->mclk = devm_clk_get_optional(component->dev, "mclk"); 896 896 if (IS_ERR(es8389->mclk)) 897 897 return dev_err_probe(component->dev, PTR_ERR(es8389->mclk), 898 898 "ES8389 is unable to get mclk\n");