All of lore.kernel.org
 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: Fri, 25 Oct 2019 11:16:39 +0800	[thread overview]
Message-ID: <5DB26917.7010606@huawei.com> (raw)
In-Reply-To: <20191025024216.GB331827@kroah.com>

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 :(
>
> .
>
But I do not see other mantainer take the patch so far.

Thanks,
zhong jiang


  reply	other threads:[~2019-10-25  3:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16  7:38 [PATCH] staging: rtl8723bs: remove an redundant null check before kfree() zhong jiang
2019-10-25  2:42 ` Greg KH
2019-10-25  3:16   ` zhong jiang [this message]
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

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=5DB26917.7010606@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.