lkml.org 
[lkml]   [2022]   [Apr]   [13]   [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/13/22 23:11, Jaehee Park wrote:
> Remove braces for single statement block to minimize the number of
> empty lines, without loss of readability. Issue found with checkpatch.
> WARNING: braces {} are not necessary for single statement blocks
>
> Signed-off-by: Jaehee Park <jhpark1013@gmail.com>
> ---
> drivers/staging/r8188eu/core/rtw_mlme.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c
> index 3e9882f89f76..d3f4d7cdfa08 100644
> --- a/drivers/staging/r8188eu/core/rtw_mlme.c
> +++ b/drivers/staging/r8188eu/core/rtw_mlme.c
> @@ -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




With regards,
Pavel Skripkin

\
 
 \ /
  Last update: 2022-04-13 22:25    [W:0.110 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site