From 06efad5808aa0db3528eca4b8faee4013ffd787b Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Pouiller?= Date: Mon, 20 Apr 2020 18:03:08 +0200 Subject: [PATCH] staging: wfx: drop useless checks in wfx_do_unjoin() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The callers of wfx_do_unjoin() already take care of vif state. Therefore, it is not necessary to take care of the status of the interface. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200420160311.57323-14-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wfx/sta.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 56cb6fff4a06..bc891b6e4392 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -286,12 +286,6 @@ void wfx_set_default_unicast_key(struct ieee80211_hw *hw, // Call it with wdev->conf_mutex locked static void wfx_do_unjoin(struct wfx_vif *wvif) { - if (!wvif->state) - return; - - if (wvif->state == WFX_STATE_AP) - return; - wvif->state = WFX_STATE_PASSIVE; /* Unjoin is a reset. */ -- 2.20.1