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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 5 Dec 2019 13:22:08 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Xiongfeng Wang <wangxiongfeng2@...wei.com>
Cc:     jslaby@...e.com, linux-serial@...r.kernel.org,
        linux-kernel@...r.kernel.org, huawei.libin@...wei.com
Subject: Re: [PATCH] tty: serial: 8250: remove set but unused variable

On Thu, Dec 05, 2019 at 08:11:43PM +0800, Xiongfeng Wang wrote:
> Fix the following warning:
> drivers/tty/serial/8250/serial_cs.c: In function multi_config:
> drivers/tty/serial/8250/serial_cs.c:562:7: warning: variable err set but not used [-Wunused-but-set-variable]
> 
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Xiongfeng Wang <wangxiongfeng2@...wei.com>
> ---
>  drivers/tty/serial/8250/serial_cs.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/serial_cs.c b/drivers/tty/serial/8250/serial_cs.c
> index c8186a0..eeda6a0 100644
> --- a/drivers/tty/serial/8250/serial_cs.c
> +++ b/drivers/tty/serial/8250/serial_cs.c
> @@ -559,16 +559,13 @@ static int multi_config(struct pcmcia_device *link)
>  	 */
>  	if (info->manfid == MANFID_OXSEMI || (info->manfid == MANFID_POSSIO &&
>  				info->prodid == PRODID_POSSIO_GCC)) {
> -		int err;
> -
>  		if (link->config_index == 1 ||
>  		    link->config_index == 3) {
> -			err = setup_serial(link, info, base2,
> -					link->irq);
> +			setup_serial(link, info, base2, link->irq);
>  			base2 = link->resource[0]->start;
>  		} else {
> -			err = setup_serial(link, info, link->resource[0]->start,
> -					link->irq);
> +			setup_serial(link, info, link->resource[0]->start,
> +				     link->irq);

Again, why ignore the error value?

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ