crypto: omap - Removed unused variable "err"
authorRahul Pathak <rpathak@visteon.com>
Mon, 14 Dec 2015 08:45:23 +0000 (08:45 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 17 Dec 2015 08:42:13 +0000 (16:42 +0800)
Removed unused variable "err" and directly return "0"

Reported by coccicheck -
./drivers/crypto/omap-aes.c:542:5-8: Unneeded variable: "err". Return "0" on line 551
./drivers/crypto/omap-des.c:530:5-8: Unneeded variable: "err". Return "0" on line 539

Signed-off-by: Rahul Pathak <rpathak@visteon.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/omap-aes.c
drivers/crypto/omap-des.c

index eba23147c0ee1de8552aabe4b5d0aeeffa2e6aba..dd355bd19474fa990d8a2cb0856d4d56ab076345 100644 (file)
@@ -539,8 +539,6 @@ static void omap_aes_finish_req(struct omap_aes_dev *dd, int err)
 
 static int omap_aes_crypt_dma_stop(struct omap_aes_dev *dd)
 {
-       int err = 0;
-
        pr_debug("total: %d\n", dd->total);
 
        omap_aes_dma_stop(dd);
@@ -548,7 +546,7 @@ static int omap_aes_crypt_dma_stop(struct omap_aes_dev *dd)
        dmaengine_terminate_all(dd->dma_lch_in);
        dmaengine_terminate_all(dd->dma_lch_out);
 
-       return err;
+       return 0;
 }
 
 static int omap_aes_check_aligned(struct scatterlist *sg, int total)
index db1ef28e4c9a2235f82524d6ddbc8680fdccb3e5..dd7b93f2f94ce3a527ad019dd8735fcadc39b83d 100644 (file)
@@ -527,8 +527,6 @@ static void omap_des_finish_req(struct omap_des_dev *dd, int err)
 
 static int omap_des_crypt_dma_stop(struct omap_des_dev *dd)
 {
-       int err = 0;
-
        pr_debug("total: %d\n", dd->total);
 
        omap_des_dma_stop(dd);
@@ -536,7 +534,7 @@ static int omap_des_crypt_dma_stop(struct omap_des_dev *dd)
        dmaengine_terminate_all(dd->dma_lch_in);
        dmaengine_terminate_all(dd->dma_lch_out);
 
-       return err;
+       return 0;
 }
 
 static int omap_des_copy_needed(struct scatterlist *sg)