mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: zhong jiang <zhongjiang@huawei.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: rtl8723bs: remove an redundant null check before kfree()
Date: Tue, 29 Oct 2019 16:19:01 +0800	[thread overview]
Message-ID: <5DB7F5F5.9050109@huawei.com> (raw)
In-Reply-To: <20191029080634.GB506924@kroah.com>

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 <zhongjiang@huawei.com>
>>>>>> ---
>>>>>>  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
>
> .
>



      reply	other threads:[~2019-10-29  8:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16  7:38 zhong jiang
2019-10-25  2:42 ` Greg KH
2019-10-25  3:16   ` zhong jiang
2019-10-28 16:05   ` zhong jiang
2019-10-28 16:24     ` Greg KH
2019-10-29  1:25       ` zhong jiang
2019-10-29  8:06         ` Greg KH
2019-10-29  8:19           ` zhong jiang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5DB7F5F5.9050109@huawei.com \
    --to=zhongjiang@huawei.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®