lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8761v8aww3.fsf@xmission.com>
Date:	Wed, 14 Aug 2013 12:35:24 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	"David S. Miller" <davem@...emloft.net>,
	John Fastabend <john.r.fastabend@...el.com>,
	Jiri Pirko <jiri@...nulli.us>,
	Vlad Yasevich <vyasevic@...hat.com>, netdev@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [patch] rtnetlink: remove an unneeded test

Dan Carpenter <dan.carpenter@...cle.com> writes:

> We know that "dev" is a valid pointer at this point, so we can remove
> the test and clean up a little.

Quite right.

Reviewed-by: "Eric W. Biederman" <ebiederm@...ssion.com>

>
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
>
> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
> index 618dbe4..e7e058e 100644
> --- a/net/core/rtnetlink.c
> +++ b/net/core/rtnetlink.c
> @@ -1867,10 +1867,10 @@ replay:
>  		else
>  			err = register_netdevice(dev);
>  
> -		if (err < 0 && !IS_ERR(dev))
> +		if (err < 0) {
>  			free_netdev(dev);
> -		if (err < 0)
>  			goto out;
> +		}
>  
>  		err = rtnl_configure_link(dev, ifm);
>  		if (err < 0)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ