linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wireless: Simplify expression
@ 2021-04-23  9:49 zuoqilin1
  2021-06-15 13:34 ` rndis_wlan: simplify is_associated() Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: zuoqilin1 @ 2021-04-23  9:49 UTC (permalink / raw)
  To: jussi.kivilinna, kvalo, davem, kuba
  Cc: linux-wireless, netdev, linux-kernel, zuoqilin

From: zuoqilin <zuoqilin@yulong.com>

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>
---
 drivers/net/wireless/rndis_wlan.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index 9fe7755..63ce244 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)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: rndis_wlan: simplify is_associated()
  2021-04-23  9:49 [PATCH] wireless: Simplify expression zuoqilin1
@ 2021-06-15 13:34 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2021-06-15 13:34 UTC (permalink / raw)
  To: zuoqilin1
  Cc: jussi.kivilinna, davem, kuba, linux-wireless, netdev,
	linux-kernel, zuoqilin

zuoqilin1@163.com wrote:

> From: zuoqilin <zuoqilin@yulong.com>
> 
> 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>

Patch applied to wireless-drivers-next.git, thanks.

ad4d74cd8177 rndis_wlan: simplify is_associated()

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20210423094940.1593-1-zuoqilin1@163.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-15 13:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23  9:49 [PATCH] wireless: Simplify expression zuoqilin1
2021-06-15 13:34 ` rndis_wlan: simplify is_associated() Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).