Commit 8fbf8636 authored by Yang Yingliang's avatar Yang Yingliang Committed by Stephen Boyd
Browse files

clk: mediatek: clk-mt8195-topckgen: Fix error return code in clk_mt8195_topck_probe()



If devm_clk_hw_register_mux() fails in clk_mt8195_topck_probe(), it should return
error code.

Fixes: deeb2af7 ("clk: mediatek: clk-mt8195-topckgen: Register mfg_ck_fast_ref as generic mux")
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221009025056.35311-1-yangyingliang@huawei.com


Reviewed-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 7e3e6e1b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1270,8 +1270,10 @@ static int clk_mt8195_topck_probe(struct platform_device *pdev)
	hw = devm_clk_hw_register_mux(&pdev->dev, "mfg_ck_fast_ref", mfg_fast_parents,
				      ARRAY_SIZE(mfg_fast_parents), CLK_SET_RATE_PARENT,
				      (base + 0x250), 8, 1, 0, &mt8195_clk_lock);
	if (IS_ERR(hw))
	if (IS_ERR(hw)) {
		r = PTR_ERR(hw);
		goto unregister_muxes;
	}
	top_clk_data->hws[CLK_TOP_MFG_CK_FAST_REF] = hw;

	r = clk_mt8195_reg_mfg_mux_notifier(&pdev->dev,