提交 59df87c3 编写于 作者: F Fabio Estevam 提交者: Herbert Xu

crypto: mxc-scc - check clk_prepare_enable() error

clk_prepare_enable() may fail, so we should better check its return
value and propagate it in the case of failure.
Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 161040fc
...@@ -668,7 +668,9 @@ static int mxc_scc_probe(struct platform_device *pdev) ...@@ -668,7 +668,9 @@ static int mxc_scc_probe(struct platform_device *pdev)
return PTR_ERR(scc->clk); return PTR_ERR(scc->clk);
} }
clk_prepare_enable(scc->clk); ret = clk_prepare_enable(scc->clk);
if (ret)
return ret;
/* clear error status register */ /* clear error status register */
writel(0x0, scc->base + SCC_SCM_ERROR_STATUS); writel(0x0, scc->base + SCC_SCM_ERROR_STATUS);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册