aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 37902a54e9c1..9a8cde999955 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -761,11 +761,13 @@ static int nl80211_set_channel(struct sk_buff *skb, struct genl_info *info)
761 761
762 result = get_rdev_dev_by_info_ifindex(info, &rdev, &netdev); 762 result = get_rdev_dev_by_info_ifindex(info, &rdev, &netdev);
763 if (result) 763 if (result)
764 goto unlock; 764 goto unlock_rtnl;
765 765
766 result = __nl80211_set_channel(rdev, netdev->ieee80211_ptr, info); 766 result = __nl80211_set_channel(rdev, netdev->ieee80211_ptr, info);
767 767
768 unlock: 768 dev_put(netdev);
769 cfg80211_unlock_rdev(rdev);
770 unlock_rtnl:
769 rtnl_unlock(); 771 rtnl_unlock();
770 772
771 return result; 773 return result;
@@ -4996,7 +4998,7 @@ static int nl80211_set_cqm_rssi(struct genl_info *info,
4996 4998
4997 err = get_rdev_dev_by_info_ifindex(info, &rdev, &dev); 4999 err = get_rdev_dev_by_info_ifindex(info, &rdev, &dev);
4998 if (err) 5000 if (err)
4999 goto unlock_rdev; 5001 goto unlock_rtnl;
5000 5002
5001 wdev = dev->ieee80211_ptr; 5003 wdev = dev->ieee80211_ptr;
5002 5004
@@ -5013,9 +5015,10 @@ static int nl80211_set_cqm_rssi(struct genl_info *info,
5013 err = rdev->ops->set_cqm_rssi_config(wdev->wiphy, dev, 5015 err = rdev->ops->set_cqm_rssi_config(wdev->wiphy, dev,
5014 threshold, hysteresis); 5016 threshold, hysteresis);
5015 5017
5016unlock_rdev: 5018 unlock_rdev:
5017 cfg80211_unlock_rdev(rdev); 5019 cfg80211_unlock_rdev(rdev);
5018 dev_put(dev); 5020 dev_put(dev);
5021 unlock_rtnl:
5019 rtnl_unlock(); 5022 rtnl_unlock();
5020 5023
5021 return err; 5024 return err;