linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: remove an redundant null check before kfree()
@ 2019-10-16  7:38 zhong jiang
  2019-10-25  2:42 ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: zhong jiang @ 2019-10-16  7:38 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, zhongjiang

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] staging: rtl8723bs: remove an redundant null check before kfree()
  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
  2019-10-28 16:05   ` zhong jiang
  0 siblings, 2 replies; 8+ messages in thread
From: Greg KH @ 2019-10-25  2:42 UTC (permalink / raw)
  To: zhong jiang; +Cc: linux-kernel

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 :(

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] staging: rtl8723bs: remove an redundant null check before kfree()
  2019-10-25  2:42 ` Greg KH
@ 2019-10-25  3:16   ` zhong jiang
  2019-10-28 16:05   ` zhong jiang
  1 sibling, 0 replies; 8+ messages in thread
From: zhong jiang @ 2019-10-25  3:16 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] staging: rtl8723bs: remove an redundant null check before kfree()
  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
  1 sibling, 1 reply; 8+ messages in thread
From: zhong jiang @ 2019-10-28 16:05 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel

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 ?

Thanks,
zhong jiang


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] staging: rtl8723bs: remove an redundant null check before kfree()
  2019-10-28 16:05   ` zhong jiang
@ 2019-10-28 16:24     ` Greg KH
  2019-10-29  1:25       ` zhong jiang
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2019-10-28 16:24 UTC (permalink / raw)
  To: zhong jiang; +Cc: linux-kernel

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,

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] staging: rtl8723bs: remove an redundant null check before kfree()
  2019-10-28 16:24     ` Greg KH
@ 2019-10-29  1:25       ` zhong jiang
  2019-10-29  8:06         ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: zhong jiang @ 2019-10-29  1:25 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel

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 ? :-)

Thanks,
zhong jiang
> greg k-h
>
> .
>



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] staging: rtl8723bs: remove an redundant null check before kfree()
  2019-10-29  1:25       ` zhong jiang
@ 2019-10-29  8:06         ` Greg KH
  2019-10-29  8:19           ` zhong jiang
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2019-10-29  8:06 UTC (permalink / raw)
  To: zhong jiang; +Cc: linux-kernel

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.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] staging: rtl8723bs: remove an redundant null check before kfree()
  2019-10-29  8:06         ` Greg KH
@ 2019-10-29  8:19           ` zhong jiang
  0 siblings, 0 replies; 8+ messages in thread
From: zhong jiang @ 2019-10-29  8:19 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel

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
>
> .
>



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-10-29  8:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).