Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4008374ybg; Tue, 29 Oct 2019 00:21:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEjUGKh6hS5/Tt4MyKPzrPjR2I91E+fCGIOrld4VKGUvXyzlK0oFrf0pSAaX1FrUhqfbTi X-Received: by 2002:a05:6402:1614:: with SMTP id f20mr24220392edv.202.1572333677988; Tue, 29 Oct 2019 00:21:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572333677; cv=none; d=google.com; s=arc-20160816; b=B5mSYJU6B92fVUVMQTJKhLho1a73RsVuY47IIRAQ8Y/LCygyWZhYK4OxJ0bQ+drjqK rTrXcrQTLY7szSId19GX5UXbNoIJsPlbKYpplezkun0wCElHwT6cesfGCn4bWrVnxPER hywScxtN0Z5k1T4QBXiC5SfkyV0ONkzVxTJKczOLGgKNYEroptIyzw2poguSB51OSLCX 9HlQ1TxR9aZfcxFA1XTYaB7nSmPFo56AsZD9i0urOQUNLSAhK42c/PI4ivLAD6LInyh6 GQnjAdKf9edY8mapyT+VEstcmSRtMANag/Ye2KBup64rn3wzVYbwMYx7oiYRd/mY1uV9 ir3Q== 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=sWvWqFjahwD1MrCoX5Et4fRHgRkA1vkXlF2HMW6olDg=; b=HvDuTMGMv+kw3Zi3N0aOQuzMyARhgMvoELPR1m+SLkT7wJuwuNueGIPwxhhJBzVKKJ gDM519TwELT6bliJcwgm9GFZ67ViuCTAjcfZcbnivgFSkB2SNeejSex21DkfhvHKlwkV +jPI6RtXVl1e5zZ7A45Am2KGwvpjWS1vmEqTTFyF39OdzLHyryF0nZ0GkF+O//36sEOY NDmjz2oZl+amgZhJGAqfhs/NeH9Tbmi92hItlncQrCWl0e1wR6863qNBoJODEs8EWk+Q 5k6EdI4+vl1yIsuQnODS3Kk4XvmICSCh1Ix3YUlso4CkJam8tWGthSFh2phsxQjdv1ol Oslg== 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 d28si9433032edb.10.2019.10.29.00.20.54; Tue, 29 Oct 2019 00:21:17 -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 S1728800AbfJ2BZV (ORCPT + 99 others); Mon, 28 Oct 2019 21:25:21 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5204 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728754AbfJ2BZU (ORCPT ); Mon, 28 Oct 2019 21:25:20 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 3800B9EF4580E136FF24; Tue, 29 Oct 2019 09:25:17 +0800 (CST) Received: from [127.0.0.1] (10.133.219.218) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Tue, 29 Oct 2019 09:25:15 +0800 Message-ID: <5DB794FB.4010203@huawei.com> Date: Tue, 29 Oct 2019 09:25:15 +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> In-Reply-To: <20191028162434.GB321492@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 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 ? :-) Thanks, zhong jiang > greg k-h > > . >