diff options
author | zuoqilin <zuoqilin@yulong.com> | 2021-04-23 12:49:40 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2021-06-15 16:34:19 +0300 |
commit | ad4d74cd81779e8f33e7365ae98280835604e905 (patch) | |
tree | ca720ef8f42abd0e809fbc3826f17d19b2d761dd /drivers/net/wireless/rndis_wlan.c | |
parent | 7b7362ba27a23a9042e2423407e6ce16d388aba0 (diff) | |
download | linux-ad4d74cd81779e8f33e7365ae98280835604e905.tar.xz |
rndis_wlan: simplify is_associated()
It is not necessary to define the variable ret to receive
the return value of the get_bssid() method.
Signed-off-by: zuoqilin <zuoqilin@yulong.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210423094940.1593-1-zuoqilin1@163.com
Diffstat (limited to 'drivers/net/wireless/rndis_wlan.c')
-rw-r--r-- | drivers/net/wireless/rndis_wlan.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index 9fe77556858e..63ce2443f136 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c @@ -1036,14 +1036,11 @@ static bool is_associated(struct usbnet *usbdev) { struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev); u8 bssid[ETH_ALEN]; - int ret; if (!priv->radio_on) return false; - ret = get_bssid(usbdev, bssid); - - return (ret == 0 && !is_zero_ether_addr(bssid)); + return (get_bssid(usbdev, bssid) == 0 && !is_zero_ether_addr(bssid)); } static int disassociate(struct usbnet *usbdev, bool reset_ssid) |