Commit 5e34069c authored by Christian Lamparter's avatar Christian Lamparter Committed by John W. Linville

mac80211: fix smatch complains

mlme.c
	l.757 ieee80211_dynamic_ps_enable_work(11)
	variable dereferenced before check 'sdata'

mesh_pathtbl.c
	l.650 mesh_path_del(20) double lock 'bottom_half'
	l.663 mesh_path_del(33) double unlock 'bottom_half'
Signed-off-by: default avatarChristian Lamparter <chunkeey@googlemail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 1205f543
...@@ -647,12 +647,12 @@ int mesh_path_del(u8 *addr, struct ieee80211_sub_if_data *sdata) ...@@ -647,12 +647,12 @@ int mesh_path_del(u8 *addr, struct ieee80211_sub_if_data *sdata)
mpath = node->mpath; mpath = node->mpath;
if (mpath->sdata == sdata && if (mpath->sdata == sdata &&
memcmp(addr, mpath->dst, ETH_ALEN) == 0) { memcmp(addr, mpath->dst, ETH_ALEN) == 0) {
spin_lock_bh(&mpath->state_lock); spin_lock(&mpath->state_lock);
mpath->flags |= MESH_PATH_RESOLVING; mpath->flags |= MESH_PATH_RESOLVING;
hlist_del_rcu(&node->list); hlist_del_rcu(&node->list);
call_rcu(&node->rcu, mesh_path_node_reclaim); call_rcu(&node->rcu, mesh_path_node_reclaim);
atomic_dec(&tbl->entries); atomic_dec(&tbl->entries);
spin_unlock_bh(&mpath->state_lock); spin_unlock(&mpath->state_lock);
goto enddel; goto enddel;
} }
} }
......
...@@ -749,7 +749,7 @@ void ieee80211_dynamic_ps_enable_work(struct work_struct *work) ...@@ -749,7 +749,7 @@ void ieee80211_dynamic_ps_enable_work(struct work_struct *work)
container_of(work, struct ieee80211_local, container_of(work, struct ieee80211_local,
dynamic_ps_enable_work); dynamic_ps_enable_work);
struct ieee80211_sub_if_data *sdata = local->ps_sdata; struct ieee80211_sub_if_data *sdata = local->ps_sdata;
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; struct ieee80211_if_managed *ifmgd;
unsigned long flags; unsigned long flags;
int q; int q;
...@@ -757,6 +757,8 @@ void ieee80211_dynamic_ps_enable_work(struct work_struct *work) ...@@ -757,6 +757,8 @@ void ieee80211_dynamic_ps_enable_work(struct work_struct *work)
if (!sdata) if (!sdata)
return; return;
ifmgd = &sdata->u.mgd;
if (local->hw.conf.flags & IEEE80211_CONF_PS) if (local->hw.conf.flags & IEEE80211_CONF_PS)
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment