LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Colin King <colin.king@canonical.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
Paul Durrant <paul.durrant@citrix.com>,
"David S . Miller" <davem@davemloft.net>,
<xen-devel@lists.xenproject.org>, <netdev@vger.kernel.org>,
<kernel-janitors@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] xen-netback: remove redundant assignment to err
Date: Fri, 31 May 2019 08:20:05 +0100 [thread overview]
Message-ID: <20190531072005.GC25537@zion.uk.xensource.com> (raw)
In-Reply-To: <20190530190438.9571-1-colin.king@canonical.com>
On Thu, May 30, 2019 at 08:04:38PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable err is assigned with the value -ENOMEM that is never
> read and it is re-assigned a new value later on. The assignment is
> redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
> ---
> drivers/net/xen-netback/interface.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c
> index 783198844dd7..240f762b3749 100644
> --- a/drivers/net/xen-netback/interface.c
> +++ b/drivers/net/xen-netback/interface.c
> @@ -633,7 +633,7 @@ int xenvif_connect_data(struct xenvif_queue *queue,
> unsigned int rx_evtchn)
> {
> struct task_struct *task;
> - int err = -ENOMEM;
> + int err;
>
> BUG_ON(queue->tx_irq);
> BUG_ON(queue->task);
> --
> 2.20.1
>
next prev parent reply other threads:[~2019-05-31 7:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-30 19:04 Colin King
2019-05-31 7:20 ` Wei Liu [this message]
2019-05-31 21:37 ` David Miller
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=20190531072005.GC25537@zion.uk.xensource.com \
--to=wei.liu2@citrix.com \
--cc=colin.king@canonical.com \
--cc=davem@davemloft.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paul.durrant@citrix.com \
--cc=xen-devel@lists.xenproject.org \
--subject='Re: [PATCH] xen-netback: remove redundant assignment to err' \
/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
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).