If we have an mpath whose timer has not been initialized, don't try to
delete it.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
struct mpath_node *node = container_of(rp, struct mpath_node, rcu);
struct ieee80211_sub_if_data *sdata = node->mpath->sdata;
- del_timer_sync(&node->mpath->timer);
+ if (node->mpath->timer.function)
+ del_timer_sync(&node->mpath->timer);
atomic_dec(&sdata->u.mesh.mpaths);
kfree(node->mpath);
kfree(node);
mpath = node->mpath;
hlist_del_rcu(p);
if (free_leafs) {
- del_timer_sync(&mpath->timer);
+ if (mpath->timer.function)
+ del_timer_sync(&mpath->timer);
kfree(mpath);
}
kfree(node);