From patchwork Wed Aug 12 17:39:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 7003361 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6CADBC05AC for ; Wed, 12 Aug 2015 17:40:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 109B8206C5 for ; Wed, 12 Aug 2015 17:40:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 125FD206C0 for ; Wed, 12 Aug 2015 17:40:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751184AbbHLRj7 (ORCPT ); Wed, 12 Aug 2015 13:39:59 -0400 Received: from mail-yk0-f171.google.com ([209.85.160.171]:34426 "EHLO mail-yk0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751182AbbHLRj6 (ORCPT ); Wed, 12 Aug 2015 13:39:58 -0400 Received: by ykdt205 with SMTP id t205so20380264ykd.1 for ; Wed, 12 Aug 2015 10:39:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=KwRA3Nl88pCO6DOfhEjomspupBXkAVxd0BHoyD0zuCg=; b=IiXoiYuPVGxCw4FKMkzzRGtVE5CbuZRbUI6c3TbQDkGyCuwtTHtGGMY6QNdE8kkbz4 Uao6Lp2OwVzT5ZQ/iCNKATM0YNZEOF4Gn/vBcVNRHy2V6h/aaxXYj19JwJtqGKovErCH 13fdQKdKtNDCcEk/8BLW3rPvNLS6yRD4WO1R0JEApdQMTsJ1J7kiLE8hubwfgT8TVwkM 9GpsswTKAFQyXegYqpEUfsd6IWEU+nvqc369ISrhgf9j4w3Qs1JVO6rSgZLyUBARs14k Ya9/ajmh4YsqMa2gii3YRlLrB7dO/SgrrekwR96fTRdIFru9rBej3QcrtUHQpYxCZ2k0 U0vg== X-Received: by 10.170.222.137 with SMTP id o131mr34807335ykf.27.1439401198190; Wed, 12 Aug 2015 10:39:58 -0700 (PDT) Received: from localhost.localdomain ([187.64.233.140]) by smtp.gmail.com with ESMTPSA id g63sm5234524ywd.50.2015.08.12.10.39.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 12 Aug 2015 10:39:57 -0700 (PDT) From: Fabio Estevam To: herbert@gondor.apana.org.au Cc: horia.geanta@freescale.com, vicki.milhoan@freescale.com, linux-crypto@vger.kernel.org, Fabio Estevam Subject: [PATCH] crypto: caam - Remove unneeded 'ret' variable Date: Wed, 12 Aug 2015 14:39:38 -0300 Message-Id: <1439401178-3583-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam 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 --- drivers/crypto/caam/ctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index 37c2d8d..4f174ee 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/crypto/caam/ctrl.c @@ -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; } /*