From patchwork Sun Oct 23 17:08:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 8066 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp71232wru; Sun, 23 Oct 2022 10:12:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4atrkQkz/PQ6bD+lMBJbZx2WiOOtte1NACF71S0Uvr2l1RxsRgFvQ5uoa8ic2F9w/Ggjh2 X-Received: by 2002:a05:6402:34cf:b0:461:a72c:7ada with SMTP id w15-20020a05640234cf00b00461a72c7adamr3718613edc.198.1666545138712; Sun, 23 Oct 2022 10:12:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666545138; cv=none; d=google.com; s=arc-20160816; b=MIZhDJKhB7J7OkevXVHAyHtpmYZDwy2vSEOJxd6t2BnoT/4TEisjMufL16df2lrHYu u+MYIyVNCvuFboLRUF2XcKnl6tr0yoswz7+6e7crNnCOcuWFODyqIupw/M26oQOz0d0h m6YAF6rGPi01gXKQy7lOGtx7AqPVYZpbVya6l+6/D+ytHZ+k1Y+GkNgdUcQMi77OKf+0 dNmqPhu/e67h/tg1QLMmuVzoj9kJ8VntyBgN80+Vd3Zh0v6H8srlwcfj5V1ZVMYIJvEC 0eXJAMKVO6v/j+7LNIL+Zyg48SZRn2EEU2WTGVnrQMDRGgXd2UWZ8LtkWX4uO2nct6Wn k+ew== 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=4nFeAMuE5vQtUSJvez1rPYc9o3vOdn6J4P6PrllP7ZU=; b=T7gjVt8IkjSQMUIhpoP11E/zNE7zMyJ1t6vZP2xFwumxmZYYWGW6OkIFjBfZ2sDA5K zCQtKRch+eMCDE2Om+FYSY/JD9OhXe1bhCqDpwlifhI0W0gDx1/1BEMyVSLvAwqHniH3 AODkGStDsZvurnBMOnMci1DQkNIfDL3QMWeeUG1iq1CiTKIp2YV/Ebaajvu31Zk0AuW9 LyyXqrWfRtn/f39vMiTHXPDEbwhsKzzL8SIEz1ZHuUOnAxuqaf2Zsu+GdiAgXIh2957z mBNbmCQ1qhvJ178+BDxPllZ3iRRaU6X82dxCD7SQ0drZMte9Af1LyLpYL2OrtzsFI+vp SNkQ== 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 i14-20020a1709064fce00b0078db594808dsi23543736ejw.588.2022.10.23.10.11.54; Sun, 23 Oct 2022 10:12:18 -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 S230408AbiJWRI1 (ORCPT + 99 others); Sun, 23 Oct 2022 13:08:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229730AbiJWRIY (ORCPT ); Sun, 23 Oct 2022 13:08:24 -0400 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 0777F72FF4 for ; Sun, 23 Oct 2022 10:08:22 -0700 (PDT) Received: from ipservice-092-217-070-181.092.217.pools.vodafone-ip.de ([92.217.70.181] 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 1omeSP-0000Rj-N0; Sun, 23 Oct 2022 19:08:17 +0200 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 2/5] staging: r8188eu: don't set pcmd_obj components to 0 Date: Sun, 23 Oct 2022 19:08:05 +0200 Message-Id: <20221023170808.46233-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221023170808.46233-1-martin@kaiser.cx> References: <20221023170808.46233-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?1747499235644590498?= X-GMAIL-MSGID: =?utf-8?q?1747499235644590498?= pcmd_obj was allocated with kzalloc, its memory is filled with 0s. There's no need to set rsp and rspsz to NULL or 0 again. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index d146b94307b8..8050f682c997 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -6753,9 +6753,6 @@ void report_join_res(struct adapter *padapter, int res) pcmd_obj->cmdsz = cmdsz; pcmd_obj->parmbuf = pevtcmd; - pcmd_obj->rsp = NULL; - pcmd_obj->rspsz = 0; - pc2h_evt_hdr = (struct C2HEvent_Header *)(pevtcmd); pc2h_evt_hdr->len = sizeof(struct joinbss_event); pc2h_evt_hdr->ID = GEN_EVT_CODE(_JoinBss);