ASoC: fsl_mqs: Fix unchecked return value for clk_prepare_enable

Fix unchecked return value for clk_prepare_enable, add error
handler in fsl_mqs_runtime_resume.

Fixes: 9e28f6532c ("ASoC: fsl_mqs: Add MQS component driver")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/5edd68d03def367d96268f1a9a00bd528ea5aaf2.1592888591.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Shengjiu Wang 2020-06-23 14:01:12 +08:00 committed by Mark Brown
parent adf46113a6
commit 15217d170a
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 12 additions and 2 deletions

View File

@ -265,10 +265,20 @@ static int fsl_mqs_remove(struct platform_device *pdev)
static int fsl_mqs_runtime_resume(struct device *dev)
{
struct fsl_mqs *mqs_priv = dev_get_drvdata(dev);
int ret;
clk_prepare_enable(mqs_priv->ipg);
ret = clk_prepare_enable(mqs_priv->ipg);
if (ret) {
dev_err(dev, "failed to enable ipg clock\n");
return ret;
}
clk_prepare_enable(mqs_priv->mclk);
ret = clk_prepare_enable(mqs_priv->mclk);
if (ret) {
dev_err(dev, "failed to enable mclk clock\n");
clk_disable_unprepare(mqs_priv->ipg);
return ret;
}
if (mqs_priv->use_gpr)
regmap_write(mqs_priv->regmap, IOMUXC_GPR2,