[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1589535644-6820-1-git-send-email-heshuai1@xiaomi.com>
Date: Fri, 15 May 2020 17:40:44 +0800
From: heshuai1 <hexiaoshuaishuai@...il.com>
To: gregkh@...uxfoundation.org, vkor@...en.in, nishkadg.linux@...il.com
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
heshuai1 <heshuai1@...omi.com>
Subject: [PATCH] rtl8723bs: core: fix a coding style error
Fix this coding style error reported by checkpatch.pl:
ERROR: do not use assignment in if condition
#1120: FILE: drivers/staging/rtl8723bs/core/rtw_ieee80211.c:1120::
+ if ((addr = of_get_property(np, "local-mac-address", &len)) &&
Signed-off-by: heshuai1 <heshuai1@...omi.com>
---
drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
index ca98274..06be1d4 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
@@ -1117,8 +1117,8 @@ void rtw_macaddr_cfg(struct device *dev, u8 *mac_addr)
}
if (is_broadcast_ether_addr(mac) || is_zero_ether_addr(mac)) {
- if ((addr = of_get_property(np, "local-mac-address", &len)) &&
- len == ETH_ALEN) {
+ addr = of_get_property(np, "local-mac-address", &len);
+ if (addr && len == ETH_ALEN) {
ether_addr_copy(mac_addr, addr);
} else {
eth_random_addr(mac_addr);
--
2.7.4
Powered by blists - more mailing lists