Unverified Commit e32c4025 authored by Goko Mell's avatar Goko Mell Committed by Mark Brown
Browse files

ASoC: spacemit: fix incorrect error check for sspa clock



Fix a wrong IS_ERR() check in spacemit_i2s_probe() where `clk` was used
instead of `i2s->sspa_clk`.

Signed-off-by: default avatarGoko Mell <goku.sonxin626@gmail.com>
Link: https://patch.msgid.link/20251106-spacemit-i2s-fix-v1-1-ee2cedcdda23@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6951be39
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -414,8 +414,9 @@ static int spacemit_i2s_probe(struct platform_device *pdev)
		return dev_err_probe(i2s->dev, PTR_ERR(clk), "failed to enable sspa_bus clock\n");

	i2s->sspa_clk = devm_clk_get_enabled(i2s->dev, "sspa");
	if (IS_ERR(clk))
		return dev_err_probe(i2s->dev, PTR_ERR(clk), "failed to enable sspa clock\n");
	if (IS_ERR(i2s->sspa_clk))
		return dev_err_probe(i2s->dev, PTR_ERR(i2s->sspa_clk),
				     "failed to enable sspa clock\n");

	i2s->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
	if (IS_ERR(i2s->base))