diff options
-rw-r--r-- | net/decnet/dn_dev.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index 6e1f085db06a..d82694d930b4 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c | |||
@@ -600,15 +600,17 @@ static void dn_dev_check_default(struct net_device *dev) | |||
600 | dev_put(dev); | 600 | dev_put(dev); |
601 | } | 601 | } |
602 | 602 | ||
603 | /* | ||
604 | * Called with RTNL | ||
605 | */ | ||
603 | static struct dn_dev *dn_dev_by_index(int ifindex) | 606 | static struct dn_dev *dn_dev_by_index(int ifindex) |
604 | { | 607 | { |
605 | struct net_device *dev; | 608 | struct net_device *dev; |
606 | struct dn_dev *dn_dev = NULL; | 609 | struct dn_dev *dn_dev = NULL; |
607 | dev = dev_get_by_index(&init_net, ifindex); | 610 | |
608 | if (dev) { | 611 | dev = __dev_get_by_index(&init_net, ifindex); |
612 | if (dev) | ||
609 | dn_dev = dev->dn_ptr; | 613 | dn_dev = dev->dn_ptr; |
610 | dev_put(dev); | ||
611 | } | ||
612 | 614 | ||
613 | return dn_dev; | 615 | return dn_dev; |
614 | } | 616 | } |