lkml.org 
[lkml]   [2022]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/6] staging: r8188eu: remove unnecessary braces in single statement block
From
Hi Jaehee,

On 4/14/22 22:41, Jaehee Park wrote:
>> > @@ -112,9 +112,8 @@ void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
>> > rtw_free_mlme_priv_ie_data(pmlmepriv);
>> > - if (pmlmepriv) {
>> > + if (pmlmepriv)
>> > vfree(pmlmepriv->free_bss_buf);
>> > - }
>>
>> If pmlmepriv is equal to NULL we would die in rtw_free_mlme_priv_ie_data(),
>> so this check is just redundant
>>
>
> Hi Pavel, thank you for your comment! If I'm removing this if statement,
> should I include vfree(pmlmepriv->free_bss_buf) in
> rtw_free_mlme_priv_ie_data?
>

Hm

Simple grep shows, that this member is just unused

1 drivers/staging/r8188eu/core/rtw_mlme.c|64 col 13|
pmlmepriv->free_bss_buf = pbuf;
2 drivers/staging/r8188eu/core/rtw_mlme.c|116 col 20|
vfree(pmlmepriv->free_bss_buf);
3 drivers/staging/r8188eu/include/rtw_mlme.h|322 col 6| u8 *free_bss_buf;

so looks like you can just remove free_bss_buf and all related lines.

I hope I haven't overlooked something



With regards,
Pavel Skripkin
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2022-04-14 21:53    [W:0.047 / U:0.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site