linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: Colin King <colin.king@canonical.com>
Cc: Steve French <sfrench@samba.org>,
	CIFS <linux-cifs@vger.kernel.org>,
	samba-technical <samba-technical@lists.samba.org>,
	kernel-janitors <kernel-janitors@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cifs: remove redundant initialization of variable rc
Date: Sat, 30 May 2020 16:08:01 -0500	[thread overview]
Message-ID: <CAH2r5mumV8UJPaXx-hWMWOB3bjz5dPH=4gEkiDGQBqnYdFxq3w@mail.gmail.com> (raw)
In-Reply-To: <20200527125031.173987-1-colin.king@canonical.com>

merged into cifs-2.6.git for-next


On Wed, May 27, 2020 at 7:52 AM Colin King <colin.king@canonical.com> wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable rc is being initialized with a value that is never read
> and it is being updated later with a new value.  The initialization is
> redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  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 5014a82391ff..d62f9175c546 100644
> --- a/fs/cifs/cifssmb.c
> +++ b/fs/cifs/cifssmb.c
> @@ -2375,7 +2375,7 @@ int
>  CIFSSMBWrite2(const unsigned int xid, struct cifs_io_parms *io_parms,
>               unsigned int *nbytes, struct kvec *iov, int n_vec)
>  {
> -       int rc = -EACCES;
> +       int rc;
>         WRITE_REQ *pSMB = NULL;
>         int wct;
>         int smb_hdr_len;
> --
> 2.25.1
>


--
Thanks,

Steve

  reply	other threads:[~2020-05-30 21:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27 12:50 [PATCH] cifs: remove redundant initialization of variable rc Colin King
2020-05-30 21:08 ` Steve French [this message]
2021-06-13 14:01 Colin King
2021-06-13 23:33 ` Steve French

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH2r5mumV8UJPaXx-hWMWOB3bjz5dPH=4gEkiDGQBqnYdFxq3w@mail.gmail.com' \
    --to=smfrench@gmail.com \
    --cc=colin.king@canonical.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=samba-technical@lists.samba.org \
    --cc=sfrench@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).