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
This commit is contained in:
zuoqilin 2021-04-23 17:49:40 +08:00 committed by Kalle Valo
parent 7b7362ba27
commit ad4d74cd81
1 changed files with 1 additions and 4 deletions

View File

@ -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)