[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <31fb322b-c0c2-b783-47bc-52be842f8661@linux.intel.com>
Date: Thu, 17 Oct 2019 08:16:22 -0500
From: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To: Chuhong Yuan <hslester96@...il.com>
Cc: Cezary Rojewski <cezary.rojewski@...el.com>,
Liam Girdwood <liam.r.girdwood@...ux.intel.com>,
Jie Yang <yang.jie@...ux.intel.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org
Subject: Re: [alsa-devel] [PATCH] ASoC: Intel: sof-rt5682: add a check for
devm_clk_get
On 10/16/19 9:50 PM, Chuhong Yuan wrote:
> sof_audio_probe misses a check for devm_clk_get and may cause problems.
> Add a check for it to fix the bug.
Indeed this is a miss, we have this test in all machine drivers except
this one. Thanks for the patch!
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
>
> Signed-off-by: Chuhong Yuan <hslester96@...il.com>
> ---
> sound/soc/intel/boards/sof_rt5682.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c
> index a437567b8cee..6d15c7ff66bf 100644
> --- a/sound/soc/intel/boards/sof_rt5682.c
> +++ b/sound/soc/intel/boards/sof_rt5682.c
> @@ -576,6 +576,15 @@ static int sof_audio_probe(struct platform_device *pdev)
> /* need to get main clock from pmc */
> if (sof_rt5682_quirk & SOF_RT5682_MCLK_BYTCHT_EN) {
> ctx->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3");
> + if (IS_ERR(ctx->mclk)) {
> + ret = PTR_ERR(ctx->mclk);
> +
> + dev_err(&pdev->dev,
> + "Failed to get MCLK from pmc_plt_clk_3: %d\n",
> + ret);
> + return ret;
> + }
> +
> ret = clk_prepare_enable(ctx->mclk);
> if (ret < 0) {
> dev_err(&pdev->dev,
>
Powered by blists - more mailing lists