[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180621182230.27823-1-michael.straube@posteo.de>
Date: Thu, 21 Jun 2018 20:22:30 +0200
From: Michael Straube <michael.straube@...teo.de>
To: gregkh@...uxfoundation.org
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
Michael Straube <michael.straube@...teo.de>
Subject: [PATCH] staging: rtl8723bs: do not use assignment in if condition
Fix checkpatch error 'do not use assignment in if condition'.
Signed-off-by: Michael Straube <michael.straube@...teo.de>
---
drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
index e55895632921..87a4ced41028 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
@@ -1181,9 +1181,8 @@ void rtw_macaddr_cfg(struct device *dev, u8 *mac_addr)
(mac[3] == 0xff) && (mac[4] == 0xff) && (mac[5] == 0xff)) ||
((mac[0] == 0x00) && (mac[1] == 0x00) && (mac[2] == 0x00) &&
(mac[3] == 0x00) && (mac[4] == 0x00) && (mac[5] == 0x00))) {
- if (np &&
- (addr = of_get_property(np, "local-mac-address", &len)) &&
- len == ETH_ALEN) {
+ addr = of_get_property(np, "local-mac-address", &len);
+ if (np && addr && len == ETH_ALEN) {
memcpy(mac_addr, addr, ETH_ALEN);
} else {
mac[0] = 0x00;
--
2.17.1
Powered by blists - more mailing lists