Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2047548pxj; Sun, 13 Jun 2021 07:03:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7Mtw4J6tTKKPo0tH9WimgmdwEMzGs4QHiDbuz6T2ExRBV/N+QCF5XODZE7ZBTFUDXmmQk X-Received: by 2002:a05:6402:4cf:: with SMTP id n15mr13278498edw.162.1623593000087; Sun, 13 Jun 2021 07:03:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623593000; cv=none; d=google.com; s=arc-20160816; b=T48GJJ79h45ksFt0GYWmpcYvHuWfjSGFa7hrBTiY6/xWyhrQqlmxOiJUKMhnsGj+6F Ycliloi8SPL4UA0RyzFVXid+e/bndwZgt3ADJdjYVEdqSyhVwQ2eici963hKhMunMtyV +oAe8q5LkpsHuolww1fJDMn08a8LNuCt6ht31ksZJM/D2ME6bAJizFfHhZk4ZPD7RkA6 YAkcLWNIw41w/8g6JMAPyBx3wGSZhkjpgKytHzoq0SLy9UCftgK7hJCK9McNZMu73a0+ EOinN98Tj04uQrn3D0HViQ9T+qGkqiKbxYRFJHjpOCIC8gSdyZtOc5Qf6+yMq3EhkTNK 7o6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=a+hKnmmijQe8LlOuQas5AX1o56A1GKFNg9q3UIrp804=; b=V1IglhTdGhj9HjYG9soV3vpu/fmcumiJU5leOYJolhGcD2o1k625oRT6SPF00YaVUh AOpkoDOONauIfwNR4YgDR938jsolEvRSW010QpA7T3eLJf6lgKqiPN2ajbhcGASzT0tJ aSVViDO182WkV8KYPr6aTv3wcUt2aVB/RaRJQF40ijZM8vSHgBIVj1htev6auMVdEAhL nNb+asCGpLFhlx8a2etjY8ffzL3LnYk76NjeaYx6H11R5uYIp8TAMMi5xHA20Mbt9ldg m41ul9z8xJm8jH+/SPfj1MEziy8hbaOck5SIqIe3PSH9DmM6XuCa4lOKkTnB+Txbi2XQ SW4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id di24si8604780edb.509.2021.06.13.07.02.56; Sun, 13 Jun 2021 07:03:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231876AbhFMOD0 (ORCPT + 99 others); Sun, 13 Jun 2021 10:03:26 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:53977 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231755AbhFMOD0 (ORCPT ); Sun, 13 Jun 2021 10:03:26 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lsQg0-0004Tq-6D; Sun, 13 Jun 2021 14:01:24 +0000 From: Colin King To: Steve French , linux-cifs@vger.kernel.org, samba-technical@lists.samba.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] cifs: remove redundant initialization of variable rc Date: Sun, 13 Jun 2021 15:01:23 +0100 Message-Id: <20210613140123.74900-1-colin.king@canonical.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King The variable rc is being initialized with a value that is never read, the assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- fs/cifs/cifssmb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 037c44bf48f1..277cb1044cbe 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -1238,7 +1238,7 @@ SMBLegacyOpen(const unsigned int xid, struct cifs_tcon *tcon, int *pOplock, FILE_ALL_INFO *pfile_info, const struct nls_table *nls_codepage, int remap) { - int rc = -EACCES; + int rc; OPENX_REQ *pSMB = NULL; OPENX_RSP *pSMBr = NULL; int bytes_returned; -- 2.31.1