Skip to content

Commit

Permalink
[IPV6]: Remove unneeded pointer idev from addrconf_cleanup().
Browse files Browse the repository at this point in the history
This trivial patch removes the unneeded pointer idev returned from
__in6_dev_get(), which is never used. The check for NULL can be simply
done by if (__in6_dev_get(dev) == NULL).

Signed-off-by: Micah Gruber <micah.gruber@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Micah Gruber authored and David S. Miller committed Jul 11, 2007
1 parent ed8b548 commit dffe4f0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -4243,7 +4243,6 @@ int __init addrconf_init(void)
void __exit addrconf_cleanup(void)
{
struct net_device *dev;
struct inet6_dev *idev;
struct inet6_ifaddr *ifa;
int i;

Expand All @@ -4261,7 +4260,7 @@ void __exit addrconf_cleanup(void)
*/

for_each_netdev(dev) {
if ((idev = __in6_dev_get(dev)) == NULL)
if (__in6_dev_get(dev) == NULL)
continue;
addrconf_ifdown(dev, 1);
}
Expand Down

0 comments on commit dffe4f0

Please sign in to comment.