]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
crypto: mxs-dcp: Check the return value of stmp_reset_block()
authorFabio Estevam <fabio.estevam@freescale.com>
Wed, 29 Jan 2014 00:36:12 +0000 (22:36 -0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 9 Feb 2014 01:59:26 +0000 (09:59 +0800)
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>
drivers/crypto/mxs-dcp.c

index 30941d0c5803459699355ed23f264f029c478c7d..37e0706707027d291ad9ad347dadde13852b8ba7 100644 (file)
@@ -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 |