lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f26b4aec-c0a1-8c93-b34e-8b1a36ac81b3@gmail.com>
Date:   Sun, 31 Oct 2021 21:43:57 +0300
From:   Pavel Skripkin <paskripkin@...il.com>
To:     Saurav Girepunje <saurav.girepunje@...il.com>,
        Larry.Finger@...inger.net, phil@...lpotter.co.uk,
        gregkh@...uxfoundation.org, straube.linux@...il.com,
        martin@...ser.cx, linux-staging@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Cc:     saurav.girepunje@...mail.com
Subject: Re: [PATCH] staging: r8188eu: os_dep: remove the goto statement

On 10/31/21 21:10, Saurav Girepunje wrote:
> Remove the goto statement from rtw_init_drv_sw(). In this function goto
> can be replace by return statement. As on goto label exit, function
> only return it is not performing any cleanup. Avoiding goto will
> improve the function readability.
> 
> Signed-off-by: Saurav Girepunje <saurav.girepunje@...il.com>
> ---
>   drivers/staging/r8188eu/os_dep/os_intfs.c | 39 +++++++----------------
>   1 file changed, 12 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
> index 1418c9c4916c..4b409479108e 100644
> --- a/drivers/staging/r8188eu/os_dep/os_intfs.c
> +++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
> @@ -480,48 +480,34 @@ u8 rtw_init_drv_sw(struct adapter *padapter)
>   {
>   	u8	ret8 = _SUCCESS;
> 


Btw, this variable can be removed completely then. It's used only for:

ret8 = rtw_init_default_value(padapter);

with your patch applied, but rtw_init_default_value() always returns 
_SUCCESS.


> -exit:
>  	return ret8;
>  }


And just `return _SUCCESS;` here.



With regards,
Pavel Skripkin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ