diff options
Diffstat (limited to 'net/decnet')
-rw-r--r-- | net/decnet/dn_dev.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index b5ef237c8a74..5790d660bc7d 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c | |||
@@ -828,13 +828,17 @@ static int dn_dev_get_first(struct net_device *dev, __le16 *addr) | |||
828 | struct dn_dev *dn_db = (struct dn_dev *)dev->dn_ptr; | 828 | struct dn_dev *dn_db = (struct dn_dev *)dev->dn_ptr; |
829 | struct dn_ifaddr *ifa; | 829 | struct dn_ifaddr *ifa; |
830 | int rv = -ENODEV; | 830 | int rv = -ENODEV; |
831 | |||
831 | if (dn_db == NULL) | 832 | if (dn_db == NULL) |
832 | goto out; | 833 | goto out; |
834 | |||
835 | rtnl_lock(); | ||
833 | ifa = dn_db->ifa_list; | 836 | ifa = dn_db->ifa_list; |
834 | if (ifa != NULL) { | 837 | if (ifa != NULL) { |
835 | *addr = ifa->ifa_local; | 838 | *addr = ifa->ifa_local; |
836 | rv = 0; | 839 | rv = 0; |
837 | } | 840 | } |
841 | rtnl_unlock(); | ||
838 | out: | 842 | out: |
839 | return rv; | 843 | return rv; |
840 | } | 844 | } |