Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3518523ybg; Mon, 28 Oct 2019 14:13:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyOz0KaIRygwJwRtwjleCbbTT/PZImthvyFy1AaBed0i6yWQHb4MjykEaTqjHre9Bu3MGB0 X-Received: by 2002:aa7:d389:: with SMTP id x9mr21916282edq.219.1572297216833; Mon, 28 Oct 2019 14:13:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572297216; cv=none; d=google.com; s=arc-20160816; b=XjoCg41PLIHYkd9OOqD2IiJCh5WHiKn1aRTG3LXIR4b1XnUkaBJFGrcAx8lYExp4hz o4l5OlgrwCIyYCunipDLiHE5JiZYbJQjmhIM+ptHsQOhXnIsXAlW2h2DoIycHEKuCZMu AMAt/x2whVhhkpclFqqFKQSP3rDITKigm8BJIcESpNCgzA6ppPccPR6Unu8I8tztl9Dd xPpddi8Qvj+PTXS9fckBV1i4Wepnj63Fe0y4tNfpjlLpZY8JWLonWWQu1r1fU8fcPV13 xzfxcMVl3DfGbGwM6m8KnOLNmaQ2BuZWgKJJhlih72kwm8WUNosiHgBK9c3Dm3M1672s wZfQ== 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=Uz3p9vPEKzWA6Mg899Tv5D5+Bd7S0GZtHrVvLCe1MHg=; b=08ugWu/2zZGgJY69kL8YwFkm9cAQIFQe/4R2Jr7gek78ZlckS0w3AE7ffhZPgYUwA8 ZIsQli+3hvq/PmGNA586c5aFeRWvohj+WcpBkYRZYCAoSix0pCFrzfVBeX7+3ANRfI4x TwddWBydxV6fBIQmKt0ptLbmXozQ5KIr9xEurt3yVCiaHQoyBOFnbTlroYq5xbkwcvrJ AgjeTdxK1MwceqCcnf+9rPF4kON+bIlz7bpU6j+l8vvb4KcTqEqsER6j3i828Hr4YaUJ R+3VbuhiCTnQ5QxwwXkA60b2jF+mXrNy6VBxFDtxBhwH/8XR9QuS6lLqfR6vofyLjzqi vpjQ== 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 r15si6833926eji.5.2019.10.28.14.13.13; Mon, 28 Oct 2019 14:13:36 -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 S2390779AbfJ1QFr (ORCPT + 99 others); Mon, 28 Oct 2019 12:05:47 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:56796 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730627AbfJ1QFr (ORCPT ); Mon, 28 Oct 2019 12:05:47 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 0A63F43644A17016B25D; Tue, 29 Oct 2019 00:05:45 +0800 (CST) Received: from [127.0.0.1] (10.133.219.218) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Tue, 29 Oct 2019 00:05:03 +0800 Message-ID: <5DB711AE.1040904@huawei.com> Date: Tue, 29 Oct 2019 00:05:02 +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> In-Reply-To: <20191025024216.GB331827@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/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 ? Thanks, zhong jiang