From patchwork Tue Jul 4 12:15:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Jinchao X-Patchwork-Id: 115752 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1194177vqx; Tue, 4 Jul 2023 05:46:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlGLe0RXj/c5mTEx+LXoQB4b1TmSyas1tC2hgvBVNeX2RSRSF9po08h9XPkeSRyz4Qe3jFPg X-Received: by 2002:a05:6870:3325:b0:1b0:653a:af92 with SMTP id x37-20020a056870332500b001b0653aaf92mr15061428oae.8.1688474812389; Tue, 04 Jul 2023 05:46:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688474812; cv=none; d=google.com; s=arc-20160816; b=xcv7uubIrN87/KS9bXQLISIlvdoyMjrnnkDqnh9T0aMA5LfMbijfykrhM6kFhfbrVJ 0BON9l5yQkj1qKwUy3yTQELkNJQUPkL4NfQMdQZEnS+T/V/7TJfRlBFgQ1xkgk0Ht3yK R1Vk0w73DQFgORFjeFgZ8XKr1Ow0pRHi9dSH6bIMgxsPUOIs8FrPB+5LJgMso8MxFHnl vJ+nriql5y5YlRV+1QVwgQcBgikvlqiSxseW3lsvZLe4esc+lSbGCuAQSfR1QNfh9z8g f4MqDJ9QYFMo1RkC1TOfU3/aaDFDyd4UyO6kt44PFzvCTVE/vn5lSfMmGLamna0crFZ9 UoRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:content-language:accept-language:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=7cq+KauCTvjHDZs7jeFozZdeko+ieq0oUZRTMQyZuz8=; fh=eMdFCFkwwJRPoGE4xgwGI1AKfuvgCdL1BM5RpWlypVY=; b=bFuJnyrkPRSHmehXHCfK4z2a7dIh4hG3oe+FeVHNXGPnPmDTJARVDw4ic0JL2RQRvN C3GOsM01AyQ880jNlRK8ONYYniZVjqoMioIwClZ9/doCnUmmxlKFhPyXiWA66/75vo1s ssWaWCEbeJVHeVaIZz/r8lE3CeTDIiM0xDQ4elonUiSf9k7Pl/rmyCA1w+6ZFZ7QNZa8 MrPUDfLze8FocYOJYLaewiiJehf+cheO/gNc3OzGZP2KuoBfsZmeTo4DpHdWjfdXL9T5 iJ9hY9QMZ4f6tZzMYPplAXgiIQ5T4WNWcImmc6SD1KlyNm6UQLGBv55VH/U0rs2WjR2b 7ayw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 8-20020a17090a004800b0025baa49fa95si20399537pjb.1.2023.07.04.05.46.39; Tue, 04 Jul 2023 05:46:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231309AbjGDMgT (ORCPT + 99 others); Tue, 4 Jul 2023 08:36:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231436AbjGDMgR (ORCPT ); Tue, 4 Jul 2023 08:36:17 -0400 X-Greylist: delayed 1193 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 04 Jul 2023 05:36:14 PDT Received: from wxsgout04.xfusion.com (wxsgout04.xfusion.com [36.139.87.180]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA8ABE7E for ; Tue, 4 Jul 2023 05:36:14 -0700 (PDT) Received: from wuxshcsitd00602.xfusion.com (unknown [10.32.132.250]) by wxsgout04.xfusion.com (SkyGuard) with ESMTPS id 4QwMF80sf5z9xk0G; Tue, 4 Jul 2023 20:15:24 +0800 (CST) Received: from wuxshcsitd00600.xfusion.com (10.32.133.213) by wuxshcsitd00602.xfusion.com (10.32.132.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 4 Jul 2023 20:15:57 +0800 Received: from wuxshcsitd00600.xfusion.com ([fe80::6811:d152:496c:4db9]) by wuxshcsitd00600.xfusion.com ([fe80::6811:d152:496c:4db9%6]) with mapi id 15.01.2507.023; Tue, 4 Jul 2023 20:15:57 +0800 From: wangjinchao To: Greg Kroah-Hartman , "linux-staging@lists.linux.dev" , "linux-kernel@vger.kernel.org" , "outreachy@lists.linux.dev" CC: xulei Subject: [PATCH] staging: rtl8192u: Fix assignment in if condition Thread-Topic: [PATCH] staging: rtl8192u: Fix assignment in if condition Thread-Index: AQHZrmkySezXLmADBkO4wJdvqf1PeQ== Date: Tue, 4 Jul 2023 12:15:57 +0000 Message-ID: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-imapappendstamp: wuxshcsitd00600.xfusion.com (15.01.2507.023) x-originating-ip: [10.81.18.204] Content-ID: MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770494164572374779?= X-GMAIL-MSGID: =?utf-8?q?1770494164572374779?= 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 --- drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.40.0 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; }