crypto: caam - Remove unneeded 'ret' variable
authorFabio Estevam <fabio.estevam@freescale.com>
Wed, 12 Aug 2015 17:39:38 +0000 (14:39 -0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 13 Aug 2015 07:13:29 +0000 (15:13 +0800)
Variable 'ret' is only used for returning the value 0.

We can make it simpler and just return 0 instead.

The semantic patch that makes this change is available
in scripts/coccinelle/misc/returnvar.cocci.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/ctrl.c

index 37c2d8d965a643e93b445690409bd5e478c5f8a9..4f174ee8a347efa679ecbc9cc33d672f19ab11ef 100644 (file)
@@ -298,7 +298,7 @@ static int caam_remove(struct platform_device *pdev)
        struct device *ctrldev;
        struct caam_drv_private *ctrlpriv;
        struct caam_ctrl __iomem *ctrl;
-       int ring, ret = 0;
+       int ring;
 
        ctrldev = &pdev->dev;
        ctrlpriv = dev_get_drvdata(ctrldev);
@@ -328,7 +328,7 @@ static int caam_remove(struct platform_device *pdev)
        clk_disable_unprepare(ctrlpriv->caam_aclk);
        clk_disable_unprepare(ctrlpriv->caam_emi_slow);
 
-       return ret;
+       return 0;
 }
 
 /*