summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/mxs-dcp.c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2014-01-28 22:36:12 -0200
committerHerbert Xu <herbert@gondor.apana.org.au>2014-02-09 09:59:26 +0800
commitfecfd7f7e91fc1e82d44b0e64a6bda8133f2037b (patch)
treeb32b08fbc1f19fe8543ecc5d4c222e172a83cd1e /drivers/crypto/mxs-dcp.c
parente921f0307531b27dbe34c17e8a5be5a88010d179 (diff)
crypto: mxs-dcp: Check the return value of stmp_reset_block()
stmp_reset_block() may fail, so check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/mxs-dcp.c')
-rw-r--r--drivers/crypto/mxs-dcp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c
index 30941d0c580..37e07067070 100644
--- a/drivers/crypto/mxs-dcp.c
+++ b/drivers/crypto/mxs-dcp.c
@@ -949,7 +949,9 @@ static int mxs_dcp_probe(struct platform_device *pdev)
}
/* Restart the DCP block. */
- stmp_reset_block(sdcp->base);
+ ret = stmp_reset_block(sdcp->base);
+ if (ret)
+ goto err_mutex;
/* Initialize control register. */
writel(MXS_DCP_CTRL_GATHER_RESIDUAL_WRITES |