LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] xen-netback: remove redundant assignment to err
@ 2019-05-30 19:04 Colin King
  2019-05-31  7:20 ` Wei Liu
  2019-05-31 21:37 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2019-05-30 19:04 UTC (permalink / raw)
  To: Wei Liu, Paul Durrant, David S . Miller, xen-devel, netdev
  Cc: kernel-janitors, linux-kernel

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>
---
 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xen-netback: remove redundant assignment to err
  2019-05-30 19:04 [PATCH] xen-netback: remove redundant assignment to err Colin King
@ 2019-05-31  7:20 ` Wei Liu
  2019-05-31 21:37 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Wei Liu @ 2019-05-31  7:20 UTC (permalink / raw)
  To: Colin King
  Cc: Wei Liu, Paul Durrant, David S . Miller, xen-devel, netdev,
	kernel-janitors, linux-kernel

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
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xen-netback: remove redundant assignment to err
  2019-05-30 19:04 [PATCH] xen-netback: remove redundant assignment to err Colin King
  2019-05-31  7:20 ` Wei Liu
@ 2019-05-31 21:37 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-05-31 21:37 UTC (permalink / raw)
  To: colin.king
  Cc: wei.liu2, paul.durrant, xen-devel, netdev, kernel-janitors, linux-kernel

From: Colin King <colin.king@canonical.com>
Date: Thu, 30 May 2019 20:04:38 +0100

> 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>

Applied to net-next.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-31 21:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-30 19:04 [PATCH] xen-netback: remove redundant assignment to err Colin King
2019-05-31  7:20 ` Wei Liu
2019-05-31 21:37 ` David Miller

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).