From patchwork Sat Nov 26 16:01:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 26270 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp4708115wrr; Sat, 26 Nov 2022 08:04:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf4c5zWbq7FsSSm9eMQdwCYGSDSlFckA2MQ36ad6+iUunu+SfYXWJ+41KkkVY0YdrP08Lf45 X-Received: by 2002:a17:902:e849:b0:17a:aca0:e295 with SMTP id t9-20020a170902e84900b0017aaca0e295mr37154157plg.3.1669478665513; Sat, 26 Nov 2022 08:04:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669478665; cv=none; d=google.com; s=arc-20160816; b=SL2yjGZNNnvFb1V+JxXF4XgbpQVV83kXD4KlHynVHQQKeKVf1+mj/0rdmQH+pWY4UJ NLBmnAu1rGkBaFVpY/MlLBumKxGOEs5jQIMr/FgGSc9c/PHNnQlawo1cICkqbVnFwEKh 7NZbcjP4Qce9NJCB5y3AcMeUiI/u9aw2P8geUXv2LUSQcpqjouro3kQLAgLOvtbZtns/ dEX/LmbPxiwIWwT+c+MKV1qWuzkUVYk6kHT4V7WZ4/djx49f9es8pcJCAkOHviZvyQEL IwXjRe+p4gPjJpkUh40YfGLVajJbZ9Q8EtCYF4x6bVsErbZPPfO3iWJ1rLMrpkIRwO6f aPwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=kEJ/Eto1jkEe3z/2uFBgrwi3wSk7Uh+sVn1GH7LWE/4=; b=sR+DJ+8DVX3lJnzHrGB+7SCcFRhQJHOVSosvlTy2mozK6NC9ceBYYbyjZiFy/6u3LA jRC8lWviRaXIckQ0fM9tcmUSwrPh1n2pUN/B9QG5ZyNRijbsWorRRzcZtpxvQiWnerAd riPSB7LpBdX4E7i6mlkNJtqtG3n46b/NSdX+RTBx6zQAfDQlryg3m6h0pcONhQ/R232z 08m3kQgcAm13hFPKa9qOcDzR/oibvuHnvQmnj/gmbm0Qtr9Goav63079aVZn7d+ltmsb i9JCiVKddTWyoZ35l3vAsLLi3QHM0DJ01jSbembupwBA7DIaEKzzpN4Ic5BhtGHVeoZ0 Rzzw== 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 x5-20020a17090300c500b0018875900d97si6206639plc.20.2022.11.26.08.04.11; Sat, 26 Nov 2022 08:04:25 -0800 (PST) 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 S229763AbiKZQCP (ORCPT + 99 others); Sat, 26 Nov 2022 11:02:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229661AbiKZQBs (ORCPT ); Sat, 26 Nov 2022 11:01:48 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B81D5193FB for ; Sat, 26 Nov 2022 08:01:47 -0800 (PST) Received: from dslb-188-096-151-149.188.096.pools.vodafone-ip.de ([188.96.151.149] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1oyxcb-0000Ub-K2; Sat, 26 Nov 2022 17:01:41 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 10/10] staging: r8188eu: remove a variable Date: Sat, 26 Nov 2022 17:01:29 +0100 Message-Id: <20221126160129.178697-11-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221126160129.178697-1-martin@kaiser.cx> References: <20221126160129.178697-1-martin@kaiser.cx> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE 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?1750575261053302964?= X-GMAIL-MSGID: =?utf-8?q?1750575261053302964?= Check the result of rtw_check_bcn_info directly and remove the ret variable. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 362313c49c52..d32b2d569e23 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -555,7 +555,6 @@ static void OnBeacon(struct adapter *padapter, struct recv_frame *precv_frame) u8 *pframe = precv_frame->rx_data; uint len = precv_frame->len; struct wlan_bssid_ex *pbss; - int ret = _SUCCESS; u8 *ie_ptr; u32 ie_len; @@ -600,8 +599,7 @@ static void OnBeacon(struct adapter *padapter, struct recv_frame *precv_frame) if (!psta) return; - ret = rtw_check_bcn_info(padapter, pframe, len); - if (!ret) { + if (rtw_check_bcn_info(padapter, pframe, len) != _SUCCESS) { receive_disconnect(padapter, pmlmeinfo->network.MacAddress, 0); return; }