From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Colin King <colin.king@canonical.com>
Cc: linux-xfs@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] xfs: remove redundant assignment to variable error
Date: Wed, 6 Nov 2019 07:56:31 -0800 [thread overview]
Message-ID: <20191106155631.GJ4153244@magnolia> (raw)
In-Reply-To: <20191106155248.266489-1-colin.king@canonical.com>
On Wed, Nov 06, 2019 at 03:52:48PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable error is being initialized with a value that is never read
> and is being re-assigned a couple of statements later on. The
> assignment is redundant and hence can be removed.
>
> Addresses-Coverity: ("Unused value")
Er... is there a coverity id that goes with this?
Patch looks fine otherwise.
--D
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> fs/xfs/xfs_super.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
> index b3188ea49413..2302f67d1a18 100644
> --- a/fs/xfs/xfs_super.c
> +++ b/fs/xfs/xfs_super.c
> @@ -1362,7 +1362,7 @@ xfs_fc_fill_super(
> {
> struct xfs_mount *mp = sb->s_fs_info;
> struct inode *root;
> - int flags = 0, error = -ENOMEM;
> + int flags = 0, error;
>
> mp->m_super = sb;
>
> --
> 2.20.1
>
next prev parent reply other threads:[~2019-11-06 15:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-06 15:52 [PATCH][next] xfs: remove redundant assignment to variable error Colin King
2019-11-06 15:56 ` Darrick J. Wong [this message]
2019-11-06 15:59 ` Colin Ian King
2019-11-06 16:19 ` Eric Sandeen
2019-11-06 16:33 ` Colin Ian King
2019-11-06 16:53 ` Eric Sandeen
2019-11-07 6:44 ` Dan Carpenter
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=20191106155631.GJ4153244@magnolia \
--to=darrick.wong@oracle.com \
--cc=colin.king@canonical.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.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