Patchwork [1/1,net-next] net:dev: remove double indentical assignment in dev_change_net_namespace().

login
register
mail settings
Submitter Rami Rosen
Date Oct. 19, 2012, 11:09 a.m.
Message ID <1350644970-2877-1-git-send-email-ramirose@gmail.com>
Download mbox | patch
Permalink /patch/192622/
State Accepted
Delegated to: David Miller
Headers show

Comments

Rami Rosen - Oct. 19, 2012, 11:09 a.m.
This patch removes double assignment of err to -EINVAL in dev_change_net_namespace().

Signed-off-by: Rami Rosen <ramirose@gmail.com>
---
 net/core/dev.c | 1 -
 1 file changed, 1 deletion(-)
Serge Hallyn - Oct. 20, 2012, 12:07 a.m.
Quoting Rami Rosen (ramirose@gmail.com):
> This patch removes double assignment of err to -EINVAL in dev_change_net_namespace().
> 
> Signed-off-by: Rami Rosen <ramirose@gmail.com>

Yup, sure is a duplicate assignment...

Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>

> ---
>  net/core/dev.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 09cb3f6..b4978e2 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -6264,7 +6264,6 @@ int dev_change_net_namespace(struct net_device *dev, struct net *net, const char
>  		goto out;
>  
>  	/* Ensure the device has been registrered */
> -	err = -EINVAL;
>  	if (dev->reg_state != NETREG_REGISTERED)
>  		goto out;
>  
> -- 
> 1.7.11.4
> 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Oct. 22, 2012, 12:45 a.m.
From: Rami Rosen <ramirose@gmail.com>
Date: Fri, 19 Oct 2012 13:09:30 +0200

> This patch removes double assignment of err to -EINVAL in dev_change_net_namespace().
> 
> Signed-off-by: Rami Rosen <ramirose@gmail.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/core/dev.c b/net/core/dev.c
index 09cb3f6..b4978e2 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -6264,7 +6264,6 @@  int dev_change_net_namespace(struct net_device *dev, struct net *net, const char
 		goto out;
 
 	/* Ensure the device has been registrered */
-	err = -EINVAL;
 	if (dev->reg_state != NETREG_REGISTERED)
 		goto out;