diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-02-23 09:17:20 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-06 15:30:42 -0500 |
commit | dc0b0f7d1e34b797b98e4d16122b3ea6f775154c (patch) | |
tree | 6b1bbfa17735243eb8c8f9bd394ffe169bd7c22b /net/mac80211/mesh_hwmp.c | |
parent | 902acc7896d7649fb30e4b22bd4e643c7f34b02c (diff) |
mac80211: mesh hwmp locking fixes
This fixes missing unlocks noticed by sparse.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mesh_hwmp.c')
-rw-r--r-- | net/mac80211/mesh_hwmp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index 9a501aae48eb..c2f40ef418cf 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c | |||
@@ -264,8 +264,10 @@ static u32 hwmp_route_info_get(struct net_device *dev, | |||
264 | 264 | ||
265 | rcu_read_lock(); | 265 | rcu_read_lock(); |
266 | sta = sta_info_get(local, mgmt->sa); | 266 | sta = sta_info_get(local, mgmt->sa); |
267 | if (!sta) | 267 | if (!sta) { |
268 | rcu_read_unlock(); | ||
268 | return 0; | 269 | return 0; |
270 | } | ||
269 | 271 | ||
270 | last_hop_metric = airtime_link_metric_get(local, sta); | 272 | last_hop_metric = airtime_link_metric_get(local, sta); |
271 | /* Update and check originator routing info */ | 273 | /* Update and check originator routing info */ |
@@ -293,6 +295,7 @@ static u32 hwmp_route_info_get(struct net_device *dev, | |||
293 | break; | 295 | break; |
294 | default: | 296 | default: |
295 | sta_info_put(sta); | 297 | sta_info_put(sta); |
298 | rcu_read_unlock(); | ||
296 | return 0; | 299 | return 0; |
297 | } | 300 | } |
298 | new_metric = orig_metric + last_hop_metric; | 301 | new_metric = orig_metric + last_hop_metric; |