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:   Thu, 10 Feb 2022 11:17:00 +0000
From:   Mark Brown <broonie@...nel.org>
To:     Li-hao Kuo <lhjeff911@...il.com>
Cc:     linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org,
        wells.lu@...plus.com, lh.kuo@...plus.com, trix@...hat.com
Subject: Re: [PATCH] spi: Fix warning for Clang build

On Thu, Feb 10, 2022 at 10:36:56AM +0800, Li-hao Kuo wrote:

> -	int mode, ret;
> +	int mode, ret = 0;
>  
>  	mode = SP7021_SPI_IDLE;
>  	if (xfer->tx_buf && xfer->rx_buf) {
> @@ -403,7 +403,7 @@ static int sp7021_spi_slave_transfer_one(struct spi_controller *ctlr, struct spi
>  		ret = sp7021_spi_slave_rx(spi, xfer);
>  		break;
>  	default:
> -		break;
> +		return -EINVAL;

The return here means that the initialization is now redundant and will
stop the compiler spotting any future similar issues which isn't ideal.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ