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]
Date:   Sat, 15 Oct 2022 18:42:00 +0300
From:   Pavel Skripkin <paskripkin@...il.com>
To:     Martin Kaiser <martin@...ser.cx>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Larry Finger <Larry.Finger@...inger.net>,
        Phillip Potter <phil@...lpotter.co.uk>,
        Michael Straube <straube.linux@...il.com>,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 03/10] staging: r8188eu: fix status updates in SwLedOff

Hi Martin,

Martin Kaiser <martin@...ser.cx> says:
> Update bLedOn only if we could update the REG_LEDCFG2 register.
> 
> Signed-off-by: Martin Kaiser <martin@...ser.cx>
> ---
>   drivers/staging/r8188eu/core/rtw_led.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/core/rtw_led.c b/drivers/staging/r8188eu/core/rtw_led.c
> index 4f1cad890cae..38433296d327 100644
> --- a/drivers/staging/r8188eu/core/rtw_led.c
> +++ b/drivers/staging/r8188eu/core/rtw_led.c
> @@ -43,10 +43,11 @@ static void SwLedOn(struct adapter *padapter, struct led_priv *pLed)
>   static void SwLedOff(struct adapter *padapter, struct led_priv *pLed)
>   {
>   	if (padapter->bDriverStopped)
> -		goto exit;
> +		return;
> +
> +	if (rtw_write8(padapter, REG_LEDCFG2, BIT(5) | BIT(3)) != _SUCCESS)
> +		return;
>   
> -	rtw_write8(padapter, REG_LEDCFG2, BIT(5) | BIT(3));
> -exit:
>   	pLed->bLedOn = false;
>   }
>  

If we don't always update the state then, I think, it's better to inform 
the callers about it

I guess, this won't happen often, but you are changing semantic of the 
function



With regards,
Pavel Skripkin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ