Commit a7ad9a88 authored by Arvind Yadav's avatar Arvind Yadav Committed by Mark Brown

ASoC: samsung: pcm: Handle return value of clk_prepare_enable.

clk_prepare_enable() can fail here and we must check its return value.
Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8698475a
......@@ -522,7 +522,9 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "failed to get audio-bus clock\n");
return PTR_ERR(pcm->cclk);
}
clk_prepare_enable(pcm->cclk);
ret = clk_prepare_enable(pcm->cclk);
if (ret)
return ret;
/* record our pcm structure for later use in the callbacks */
dev_set_drvdata(&pdev->dev, pcm);
......@@ -533,7 +535,9 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev)
ret = PTR_ERR(pcm->pclk);
goto err_dis_cclk;
}
clk_prepare_enable(pcm->pclk);
ret = clk_prepare_enable(pcm->pclk);
if (ret)
goto err_dis_cclk;
s3c_pcm_stereo_in[pdev->id].addr = mem_res->start + S3C_PCM_RXFIFO;
s3c_pcm_stereo_out[pdev->id].addr = mem_res->start + S3C_PCM_TXFIFO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment