[PATCH v2 02/14] ASoC: mediatek: mt8195: Use dev_err_probe() in mt8195_afe_init_clock()
Ajay Kumar Nandam
ajay.nandam at oss.qualcomm.com
Thu Oct 8 04:23:14 PDT 2026
On 10/5/2026 4:32 PM, phucduc.bui at gmail.com wrote:
> From: bui duc phuc <phucduc.bui at gmail.com>
>
> Use dev_err_probe() when obtaining clocks to avoid redundant error
> messages, particularly for probe deferral.
>
> Signed-off-by: bui duc phuc <phucduc.bui at gmail.com>
LGTM
Reviewed-by: Ajay Kumar Nandam <ajay.nandam at oss.qualcomm.com>
> ---
> sound/soc/mediatek/mt8195/mt8195-afe-clk.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/sound/soc/mediatek/mt8195/mt8195-afe-clk.c b/sound/soc/mediatek/mt8195/mt8195-afe-clk.c
> index ec1ea5b988ff..12d8159338be 100644
> --- a/sound/soc/mediatek/mt8195/mt8195-afe-clk.c
> +++ b/sound/soc/mediatek/mt8195/mt8195-afe-clk.c
> @@ -397,12 +397,9 @@ int mt8195_afe_init_clock(struct mtk_base_afe *afe)
>
> for (i = 0; i < MT8195_CLK_NUM; i++) {
> afe_priv->clk[i] = devm_clk_get(afe->dev, aud_clks[i]);
> - if (IS_ERR(afe_priv->clk[i])) {
> - dev_dbg(afe->dev, "%s(), devm_clk_get %s fail, ret %ld\n",
> - __func__, aud_clks[i],
> - PTR_ERR(afe_priv->clk[i]));
> - return PTR_ERR(afe_priv->clk[i]);
> - }
> + if (IS_ERR(afe_priv->clk[i]))
> + return dev_err_probe(afe->dev, PTR_ERR(afe_priv->clk[i]),
> + "failed to get clock %s\n", aud_clks[i]);
> }
>
> /* initial tuner */
More information about the Linux-mediatek
mailing list