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] [day] [month] [year] [list]
Message-ID: <YF3qxema68+hLEZq@kroah.com>
Date:   Fri, 26 Mar 2021 15:08:05 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Xu Jia <xujia39@...wei.com>
Cc:     ross.schm.dev@...il.com, linux-kernel@...r.kernel.org,
        linux-staging@...ts.linux.dev, hulkcommits@...wei.com
Subject: Re: [PATCH -next] staging: rtl8723bs: core: fix error return

On Thu, Mar 25, 2021 at 04:30:41PM +0800, Xu Jia wrote:
> Function rtw_init_bcmc_stainfo() is always return success.
> Variable 'ret' set but not used.
> 
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Xu Jia <xujia39@...wei.com>
> ---
>  drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
> index f96dd0b40e04..7b578192adf5 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
> @@ -551,7 +551,7 @@ u32 rtw_init_bcmc_stainfo(struct adapter *padapter)
>  	psta->mac_id = 1;
>  
>  exit:
> -	return _SUCCESS;
> +	return res;
>  }

You just changed the logic of this function, now it can return a
failure.  Is that ok?  have you tested it when this fails?

Given that I do not think anyone actually tests this value, should this
function just return void instead?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ