Skip to contentSkip to conversation

NET: nl80211, fix lock imbalance and netdev referencing

PATCH New Jiri Slaby 1 participant 1 message Jul 7, 2010

Subsystems (3)
lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

PATCH 1/1 NET: nl80211, fix lock imbalance and netdev referencing

Stanse found that nl80211_set_wiphy imporperly handles a lock and netdev reference and contains unreachable code. It is because there return statement isntead of assignment to result variable. Fix that.

Cc Johannes Berg <[email protected]>
Cc "John W. Linville" <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Jouni Malinen <[email protected]>
Cc Samuel Ortiz <[email protected]>
---
 net/wireless/nl80211.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/wireless/nl80211.c +1 -1
index 85285b4..fbfac58 100644
@@ -877,7 +877,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
 		int idx, mbm = 0;
 
 		if (!rdev->ops->set_tx_power) {
-			return -EOPNOTSUPP;
+			result = -EOPNOTSUPP;
 			goto bad_res;
 		}
 
Signature · 1 line
1.7.1