wifi: wilc1000: remove redundant ret variable
authorJinpeng Cui <cui.jinpeng2@zte.com.cn>
Tue, 30 Aug 2022 10:55:05 +0000 (10:55 +0000)
committerKalle Valo <kvalo@kernel.org>
Fri, 2 Sep 2022 08:46:32 +0000 (11:46 +0300)
Return value from cfg80211_rx_mgmt() directly instead of
taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220830105505.287564-1-cui.jinpeng2@zte.com.cn
drivers/net/wireless/microchip/wilc1000/cfg80211.c

index f810a56a7ff0958b855776e57c56f34b2863178a..b89047965e78eb5cc24526eead93972b7f096939 100644 (file)
@@ -997,12 +997,11 @@ bool wilc_wfi_mgmt_frame_rx(struct wilc_vif *vif, u8 *buff, u32 size)
 {
        struct wilc *wl = vif->wilc;
        struct wilc_priv *priv = &vif->priv;
-       int freq, ret;
+       int freq;
 
        freq = ieee80211_channel_to_frequency(wl->op_ch, NL80211_BAND_2GHZ);
-       ret = cfg80211_rx_mgmt(&priv->wdev, freq, 0, buff, size, 0);
 
-       return ret;
+       return cfg80211_rx_mgmt(&priv->wdev, freq, 0, buff, size, 0);
 }
 
 void wilc_wfi_p2p_rx(struct wilc_vif *vif, u8 *buff, u32 size)