mirror of https://gitee.com/openkylin/linux.git
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:
parent
adf46113a6
commit
15217d170a
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue