diff options
author | Fabio Estevam <fabio.estevam@nxp.com> | 2016-08-22 05:37:27 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-08-24 16:04:50 +0300 |
commit | 59df87c3498a34283baf185ab0396f4742acdee5 (patch) | |
tree | 43544de4ee5b0454149bfb29768264a206bd200f /drivers/crypto/mxc-scc.c | |
parent | 161040fc1c2a4a91765c18ec260589475cb791d9 (diff) | |
download | linux-59df87c3498a34283baf185ab0396f4742acdee5.tar.xz |
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>
Diffstat (limited to 'drivers/crypto/mxc-scc.c')
-rw-r--r-- | drivers/crypto/mxc-scc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/crypto/mxc-scc.c b/drivers/crypto/mxc-scc.c index ff383ef83871..ee4be1b0d30b 100644 --- a/drivers/crypto/mxc-scc.c +++ b/drivers/crypto/mxc-scc.c @@ -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); |