From patchwork Wed Apr 11 21:37:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10337467 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4A6166020F for ; Wed, 11 Apr 2018 21:37:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39B512465D for ; Wed, 11 Apr 2018 21:37:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E3EA2839C; Wed, 11 Apr 2018 21:37:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9859F2465D for ; Wed, 11 Apr 2018 21:37:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753361AbeDKVh3 (ORCPT ); Wed, 11 Apr 2018 17:37:29 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:44802 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753358AbeDKVh3 (ORCPT ); Wed, 11 Apr 2018 17:37:29 -0400 Received: by mail-qt0-f193.google.com with SMTP id j26so3788173qtl.11 for ; Wed, 11 Apr 2018 14:37:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ybAsLaDx8QKOUkD0UHPtM1VxQ1LH5rEw6zoDQdKljPw=; b=uttlTpbcFSjQr1rnszqLo+Q0Nvt92NHEd1uYZRxTs0FcG5fAJchs8zwbQWPJPe/LTY +j2X5jZVhOckbwxgiIuFGQMW2GM6gKip6MNVau57dsaHRJduLCagcHGOxLPFbL80R8sS Mawh0OGTDIp1cVSnhpLxY9RWYvH7ZdVCXhABQ29poTcM8kwhSFulWnND+m081T1Ite0x eddRkDDXS8+ITadEf3gBfUCxwDAriUzE+BUoXESyj5j4OeH0gY2oC95U9vgb1u7kk3es B34CwByWBTMHhuQUVtzZerXyzFpFO4WAH+tcnIvfkvdPiBr4DqG+SZ5ITgKt8QvReuLO zDiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ybAsLaDx8QKOUkD0UHPtM1VxQ1LH5rEw6zoDQdKljPw=; b=Y8fgSOqJDsgelPsjKwLninWJJbSomtdwbNM/VAQOue8ru+uViKRZQpnRGjE6dMSlko HL3oIHULUn78LcQnRQmFMV69LvQsviPePpXhDTM73mVHEoUJ0HWKuwKAMKLmb6fu+lLA 4Wty4FiIXZCkTGwnlv4oqXwdknQNnYRjIgp/5Pk9PvVOHT/v1eYE5+2kvSF+wDrDmfwu AWUJI5jftHa9fQbuu8G9kAUN2jfMTuilFSpM6WYxveYmaL91EoMFWZXMescpWSVZ9Jkq 6GX8noPquemTQCqPJfDHCNrGtxbIa+DLXO8uForlTBEBnbEKsd9nmqfhWi++0GT2adeA QF+A== X-Gm-Message-State: ALQs6tAJI8V+6ivdw4/uySaqfiBqUbNC35mzHZtzS9fvssc4LqEUc5Eh 0lHaf96eCbTbfnzoFM8wZH4= X-Google-Smtp-Source: AIpwx4+XX4UqQpOX+1PmWF8zpRUrcPcHVoqh+mz2mzKcpqhe12+SxxwGmV9ADaX8SSlJi1/wnkCBkA== X-Received: by 10.237.61.93 with SMTP id h29mr10000696qtf.225.1523482648474; Wed, 11 Apr 2018 14:37:28 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:482:c19:7c86:a0be:3e8a:12c]) by smtp.gmail.com with ESMTPSA id z19sm1593710qka.39.2018.04.11.14.37.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Apr 2018 14:37:27 -0700 (PDT) From: Fabio Estevam To: herbert@gondor.apana.org.au Cc: tadeusz.struk@intel.com, linux-crypto@vger.kernel.org, Fabio Estevam Subject: [PATCH] crypto: rsa - Remove unneeded error assignment Date: Wed, 11 Apr 2018 18:37:17 -0300 Message-Id: <1523482637-12128-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam There is no need to assign an error value to 'ret' prior to calling mpi_read_raw_from_sgl() because in the case of error the 'ret' variable will be assigned to the error code inside the if block. In the case of non failure, 'ret' will be overwritten immediately after, so remove the unneeded assignment. Signed-off-by: Fabio Estevam --- crypto/rsa.c | 1 - 1 file changed, 1 deletion(-) diff --git a/crypto/rsa.c b/crypto/rsa.c index b067f3a..4167980 100644 --- a/crypto/rsa.c +++ b/crypto/rsa.c @@ -215,7 +215,6 @@ static int rsa_verify(struct akcipher_request *req) goto err_free_m; } - ret = -ENOMEM; s = mpi_read_raw_from_sgl(req->src, req->src_len); if (!s) { ret = -ENOMEM;