lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZKP/01ECsgmdBFf2@fedora>
Date:   Tue, 4 Jul 2023 12:15:57 +0000
From:   wangjinchao <wangjinchao@...sion.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "linux-staging@...ts.linux.dev" <linux-staging@...ts.linux.dev>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "outreachy@...ts.linux.dev" <outreachy@...ts.linux.dev>
CC:     xulei <stone.xulei@...sion.com>
Subject: [PATCH] staging: rtl8192u: Fix assignment in if condition

I just participated in Outreachy of KernelNewbies and fixed one 
'ERROR: do not use assignment in if condition' issue reported by 
checkpatch.pl on drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c.

Signed-off-by: Wang Jinchao <wangjinchao@...sion.com>
---
 drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
index ca09367005e1..52ff9e62ec08 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
@@ -1121,8 +1121,9 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
 
 	/* skb: hdr + (possibly fragmented, possibly encrypted) payload */
 
+	keyidx = ieee80211_rx_frame_decrypt(ieee, skb, crypt);
 	if (ieee->host_decrypt && (fc & IEEE80211_FCTL_WEP) &&
-	    (keyidx = ieee80211_rx_frame_decrypt(ieee, skb, crypt)) < 0) {
+	    keyidx < 0) {
 		netdev_dbg(ieee->dev, "decrypt frame error\n");
 		goto rx_dropped;
 	}
-- 
2.40.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ