public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: ES8389: convert to devm_clk_get_optional() to get clock
@ 2026-04-17 10:53 Li Jian
  2026-04-17 13:34 ` Uwe Kleine-König
  0 siblings, 1 reply; 5+ messages in thread
From: Li Jian @ 2026-04-17 10:53 UTC (permalink / raw)
  To: linux-kernel
  Cc: lgirdwood, loongarch, chenhuacai, zhoubinbin, jeffbai, Li Jian,
	stable, Mark Brown, Jaroslav Kysela, Takashi Iwai, Zhang Yi,
	Charles Keepax, Kuninori Morimoto, Alexandru Ardelean,
	Jonathan Cameron, Stephen Boyd, Uwe Kleine-König,
	linux-sound

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
Fixes: abae8e57e49a ("clk: generalize devm_clk_get() a bit")
Signed-off-by: Li Jian <lazycat-xiao@foxmail.com>
---
 sound/soc/codecs/es8389.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/es8389.c b/sound/soc/codecs/es8389.c
index 8d418cae3..449d9574b 100644
--- a/sound/soc/codecs/es8389.c
+++ b/sound/soc/codecs/es8389.c
@@ -892,7 +892,7 @@ static int es8389_probe(struct snd_soc_component *component)
 		return ret;
 	}
 
-	es8389->mclk = devm_clk_get(component->dev, "mclk");
+	es8389->mclk = devm_clk_get_optional(component->dev, "mclk");
 	if (IS_ERR(es8389->mclk))
 		return dev_err_probe(component->dev, PTR_ERR(es8389->mclk),
 			"ES8389 is unable to get mclk\n");
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [PATCH] ASoC: ES8389: convert to devm_clk_get_optional() to get clock
@ 2026-04-17 10:16 Li Jian
  0 siblings, 0 replies; 5+ messages in thread
From: Li Jian @ 2026-04-17 10:16 UTC (permalink / raw)
  To: lazycat-xiao; +Cc: stable

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
Fixes: abae8e57e49a ("clk: generalize devm_clk_get() a bit")
Signed-off-by: Li Jian <lazycat-xiao@foxmail.com>
---
 sound/soc/codecs/es8389.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/es8389.c b/sound/soc/codecs/es8389.c
index 8d418cae3..449d9574b 100644
--- a/sound/soc/codecs/es8389.c
+++ b/sound/soc/codecs/es8389.c
@@ -892,7 +892,7 @@ static int es8389_probe(struct snd_soc_component *component)
 		return ret;
 	}
 
-	es8389->mclk = devm_clk_get(component->dev, "mclk");
+	es8389->mclk = devm_clk_get_optional(component->dev, "mclk");
 	if (IS_ERR(es8389->mclk))
 		return dev_err_probe(component->dev, PTR_ERR(es8389->mclk),
 			"ES8389 is unable to get mclk\n");
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-04-18 11:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-17 10:53 [PATCH] ASoC: ES8389: convert to devm_clk_get_optional() to get clock Li Jian
2026-04-17 13:34 ` Uwe Kleine-König
2026-04-18  8:18   ` Li Jian
2026-04-18 11:40     ` Uwe Kleine-König
  -- strict thread matches above, loose matches on Subject: below --
2026-04-17 10:16 Li Jian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox