mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
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: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
161040fc1c
commit
59df87c349
@ -668,7 +668,9 @@ static int mxc_scc_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(scc->clk);
|
||||
}
|
||||
|
||||
clk_prepare_enable(scc->clk);
|
||||
ret = clk_prepare_enable(scc->clk);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* clear error status register */
|
||||
writel(0x0, scc->base + SCC_SCM_ERROR_STATUS);
|
||||
|
Loading…
Reference in New Issue
Block a user