Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4061776ybg; Tue, 29 Oct 2019 01:20:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqycprxiLp8OtT2FQG+sa5Qd6eS8uumroX3h0Ah2FaCW72r5e/w0uXJl69TZNseCtRvPfsG/ X-Received: by 2002:a17:906:780d:: with SMTP id u13mr1893413ejm.151.1572337243939; Tue, 29 Oct 2019 01:20:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572337243; cv=none; d=google.com; s=arc-20160816; b=IcCs6pgc/mxF63OqQuVpFLgDeo+THfqilphXz5zV7L5Tf+cCCoPpc/wyeGVnvPFa1O nETzyBTinMZxLS7074V2zNl+0AzRnEAKkE4f9PWyZXjGjyszEf/2I4vi8ErUxU9uBGE1 QVrH+uKhkvl3/b0+lO4Z7NpzFifJPblX3HwLf6nRizPeg7PpxErpL07tqvfEqRaeDjuY So11innbjXSnoMiQ7b4R3UIg8UXLpS7hncnRsqiWWaRNPKT5RJHS0QlUDPH94mSVQfw0 WTB3pLAVBg4YACRF8lfrEgkNBjhbHr2mlSxYI+7G4vNFPVhNN66hp1MHiJc79JuEQhMl NhVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :references:subject:cc:to:mime-version:user-agent:from:date :message-id; bh=d/NrUC9QPImn7q8qt9ag1Ivor84699HeRXD6D5XnG68=; b=yQWoz9MFi4nM67ijl0ttNsCkSDcuYaR8vGhcts4G73NgRrtQeLGxHgvrboXj4Tm3Oa 9hiCEL95Om4WMroZDJhLgWfU/xtpqp76+Cj4CnRNXoQG8QmZjjiua3RFI4+JtkrMl2Yd CiQlc5eBLW8nmhQ1rH/mvIdGWInUILLkFldQSwDsh/TTV9jmDRhyvLjvmGQFferpD/wo cps5W0oLxlRnj+I/NosVr/7i7NCZhhRehalMfXQ7ir3TfcUmMtkfiTRGIyxQbHGZbi7y 2qMwEGEb9wmuCJIn3ktpIGMEvc8vLOVGkS7qo/cVUqtXqi31f0SXkX1YDlaWSZxNkBLW rTew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n19si7400286ejk.264.2019.10.29.01.20.16; Tue, 29 Oct 2019 01:20:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728821AbfJ2ITK (ORCPT + 99 others); Tue, 29 Oct 2019 04:19:10 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5206 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727331AbfJ2ITK (ORCPT ); Tue, 29 Oct 2019 04:19:10 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id C8FF459913E018BC1F5C; Tue, 29 Oct 2019 16:19:06 +0800 (CST) Received: from [127.0.0.1] (10.133.219.218) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.439.0; Tue, 29 Oct 2019 16:19:02 +0800 Message-ID: <5DB7F5F5.9050109@huawei.com> Date: Tue, 29 Oct 2019 16:19:01 +0800 From: zhong jiang User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Greg KH CC: Subject: Re: [PATCH] staging: rtl8723bs: remove an redundant null check before kfree() References: <1571211506-19005-1-git-send-email-zhongjiang@huawei.com> <20191025024216.GB331827@kroah.com> <5DB711AE.1040904@huawei.com> <20191028162434.GB321492@kroah.com> <5DB794FB.4010203@huawei.com> <20191029080634.GB506924@kroah.com> In-Reply-To: <20191029080634.GB506924@kroah.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.133.219.218] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/10/29 16:06, Greg KH wrote: > On Tue, Oct 29, 2019 at 09:25:15AM +0800, zhong jiang wrote: >> On 2019/10/29 0:24, Greg KH wrote: >>> On Tue, Oct 29, 2019 at 12:05:02AM +0800, zhong jiang wrote: >>>> On 2019/10/25 10:42, Greg KH wrote: >>>>> On Wed, Oct 16, 2019 at 03:38:26PM +0800, zhong jiang wrote: >>>>>> kfree() has taken null pointer into account. hence it is safe to remove >>>>>> the unnecessary check. >>>>>> >>>>>> Signed-off-by: zhong jiang >>>>>> --- >>>>>> drivers/staging/rtl8723bs/core/rtw_xmit.c | 3 +-- >>>>>> 1 file changed, 1 insertion(+), 2 deletions(-) >>>>>> >>>>>> diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c >>>>>> index 7011c2a..4597f4f 100644 >>>>>> --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c >>>>>> +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c >>>>>> @@ -2210,8 +2210,7 @@ void rtw_free_hwxmits(struct adapter *padapter) >>>>>> struct xmit_priv *pxmitpriv = &padapter->xmitpriv; >>>>>> >>>>>> hwxmits = pxmitpriv->hwxmits; >>>>>> - if (hwxmits) >>>>>> - kfree(hwxmits); >>>>>> + kfree(hwxmits); >>>>>> } >>>>>> >>>>>> void rtw_init_hwxmits(struct hw_xmit *phwxmit, sint entry) >>>>>> -- >>>>>> 1.7.12.4 >>>>>> >>>>> Patch does not apply to my tree :( >>>>> >>>>> . >>>>> >>>> Greg, Could you apply the patch to your tree ? >>> It did not apply, so what do you want me to do with it? >>> >>> confused, >> Could you receive the patch ? :-) > The patch did not apply properly to my tree, there is no way I can apply > it. Please fix it up and resend it so that I can apply it. I will repost it in v2, Thanks Sincerely, zhong jiang > thanks, > > greg k-h > > . >