From: Sunil Shahu Date: Thu, 21 Jan 2016 05:36:25 +0000 (+0530) Subject: mac80211: mesh_plink: remove redundant sta_info check X-Git-Tag: v4.6-rc1~91^2~159^2~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b8631c003307bc7abf0180d950c42d9032ebda70;p=platform%2Fkernel%2Flinux-exynos.git mac80211: mesh_plink: remove redundant sta_info check Remove unnecessory "if" statement and club it with previos "if" block. Signed-off-by: Sunil Shahu Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index bd3d55e..a07e93c 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c @@ -976,6 +976,10 @@ mesh_plink_get_event(struct ieee80211_sub_if_data *sdata, mpl_dbg(sdata, "Mesh plink error: no more free plinks\n"); goto out; } + + /* new matching peer */ + event = OPN_ACPT; + goto out; } else { if (!test_sta_flag(sta, WLAN_STA_AUTH)) { mpl_dbg(sdata, "Mesh plink: Action frame from non-authed peer\n"); @@ -985,12 +989,6 @@ mesh_plink_get_event(struct ieee80211_sub_if_data *sdata, goto out; } - /* new matching peer */ - if (!sta) { - event = OPN_ACPT; - goto out; - } - switch (ftype) { case WLAN_SP_MESH_PEERING_OPEN: if (!matches_local)