Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp2278939imn; Mon, 1 Aug 2022 18:44:22 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uEVRjRDElbh8rp3gZ1++6Cnynhj+hkvA/36Bk/FhXM0e/IB6NGgykL7LJ6i7QdDvtXdfna X-Received: by 2002:a17:906:9c82:b0:6e1:1d6c:914c with SMTP id fj2-20020a1709069c8200b006e11d6c914cmr14344625ejc.769.1659404662374; Mon, 01 Aug 2022 18:44:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659404662; cv=none; d=google.com; s=arc-20160816; b=fGlcfIW58LAGRRFt9CPVekFIbniUhjkCcZUKmwThDIy9Q8M8dO8kZxgXaF7mH+B4KO QKcUHy5YX8NgNwWzw7i7S44/IS2KtY+i1X+zvaSkFzP0pSMR9o06rKKMss4WleBctNCd t8QqNKpwEMfDTvygoAdmf3+hl00Q7sNMA894+ot4ETfZ5MkTbyV1QyUpNUxqhoCu8PzL jAQnaoF8eYmnMRcr04QyHZFgQIWdnUbNr2/FlDbKcQ2KnvsGE6QjBJbKCaVNEXwjzJQR vtWDKTwmCjacsN3Ief7ZW4GIKZpctQMjMhZNaSE2rAMKuVhC2Yj7nBl9wP5XFM+PFffN ksxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=HBSyC15fJpNs5etaT5wSlM3TbQRa9versEF8MqFRBek=; b=A/M0UWaimr/O0ngfuw5XfU3aemIEfg+zaD0JCeR8pQPlBFAfNSqr/6hIJylYITNdKs 6FShc7pFRUgxFU+a6AHeJulaliY3ohI0qU+XjN0P4NXHKmp7wU3g7oSlExbG+6aIBeXT CUyoF6gnZ7QdVPpydfrs7yxP5/suXsRynI50WXQLOLlK0sAf6hgHOF1SX9rymAeH2Tp6 d5KT7R6Ztc19o/UKUx4lE0wlhqVsOzyBth0cLUpghBKpQgpI4p93Y6mnVzmq+1a/J4Ia 5axIYTCXwxN2GwVPjTqS9ntfOI7IiHAeaonG24HwOCO/nprEaIhs9s3AvJJGpidAkHpe JPWQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y9-20020a056402270900b0043de558914asi1411739edd.487.2022.08.01.18.43.58; Mon, 01 Aug 2022 18:44:22 -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 S234448AbiHBBZa (ORCPT + 99 others); Mon, 1 Aug 2022 21:25:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231432AbiHBBZ3 (ORCPT ); Mon, 1 Aug 2022 21:25:29 -0400 Received: from mail.nfschina.com (unknown [IPv6:2400:dd01:100f:2:72e2:84ff:fe10:5f45]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D4A94DFCB for ; Mon, 1 Aug 2022 18:25:26 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id 430581E80D46; Tue, 2 Aug 2022 09:24:44 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f-8E1Qt2Fo4p; Tue, 2 Aug 2022 09:24:41 +0800 (CST) Received: from localhost.localdomain (unknown [219.141.250.2]) (Authenticated sender: zeming@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id 74B651E80D12; Tue, 2 Aug 2022 09:24:41 +0800 (CST) From: Li zeming To: gregkh@linuxfoundation.org, sevinj.aghayeva@gmail.com, hdegoede@redhat.com, fabioaiuto83@gmail.com, duoming@zju.edu.cn, keescook@chromium.org Cc: straube.linux@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Li zeming Subject: [PATCH] staging/rtl8723bs/core: remove inactive initialization Date: Tue, 2 Aug 2022 09:25:13 +0800 Message-Id: <20220802012513.2824-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_HELO_NONE,SPF_NONE autolearn=no 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 The allocation address of the psta pointer variable is first performed in the function, no initialization assignment is required, and no invalid pointer will appear. Signed-off-by: Li zeming --- drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c index f2242cf2dfb4..6498fd17e1d3 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c @@ -2521,7 +2521,7 @@ void rtw_issue_addbareq_cmd(struct adapter *padapter, struct xmit_frame *pxmitfr { u8 issued; int priority; - struct sta_info *psta = NULL; + struct sta_info *psta; struct ht_priv *phtpriv; struct pkt_attrib *pattrib = &pxmitframe->attrib; s32 bmcst = IS_MCAST(pattrib->ra); -- 2.18.2