ASoC: da7219: properly get clk from the provider
[platform/kernel/linux-starfive.git] / sound / soc / codecs / da7219.c
index 13009d0..bd3c523 100644 (file)
@@ -2181,7 +2181,10 @@ static int da7219_register_dai_clks(struct snd_soc_component *component)
                                 ret);
                        goto err;
                }
-               da7219->dai_clks[i] = dai_clk_hw->clk;
+
+               da7219->dai_clks[i] = devm_clk_hw_get_clk(dev, dai_clk_hw, NULL);
+               if (IS_ERR(da7219->dai_clks[i]))
+                       return PTR_ERR(da7219->dai_clks[i]);
 
                /* For DT setup onecell data, otherwise create lookup */
                if (np) {