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: <b19d0f7a-03c4-c4e6-dd8c-188012402530@kernel.org>
Date:   Tue, 25 Oct 2016 17:27:07 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Lars-Peter Clausen <lars@...afoo.de>,
        Michael Hennerich <Michael.Hennerich@...log.com>,
        Hartmut Knaack <knaack.h@....de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        Eva Rachel Retuya <eraretuya@...il.com>,
        linux-iio@...r.kernel.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: iio: cdc/ad7746: fix missing return value

On 25/10/16 16:56, Arnd Bergmann wrote:
> As found by "gcc -Wmaybe-uninitialized", the latest change to the
> driver lacked an initalization for the return code in one of the
> added cases:
> 
> drivers/staging/iio/cdc/ad7746.c: In function ‘ad7746_read_raw’:
> drivers/staging/iio/cdc/ad7746.c:655:2: error: ‘ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
> 
> This sets it to IIO_VAL_INT, which I think is what we want here.
> 
> Fixes: 2296c0623eb7 ("staging: iio: cdc: ad7746: implement IIO_CHAN_INFO_SAMP_FREQ")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
Gah, not a good bit of reviewing from me. Should have caught that one.  Thanks Arnd.

Applied to the togreg branch of iio.git - initially pushed out as testing for the
autobuilders to play with it.  Will probably be a little while before I send
another pull to Greg (most likely the weekend)

Thanks again,

Jonathan
> ---
>  drivers/staging/iio/cdc/ad7746.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c
> index f41251ceeacd..a5828f9aa437 100644
> --- a/drivers/staging/iio/cdc/ad7746.c
> +++ b/drivers/staging/iio/cdc/ad7746.c
> @@ -642,6 +642,7 @@ static int ad7746_read_raw(struct iio_dev *indio_dev,
>  		case IIO_VOLTAGE:
>  			*val = ad7746_vt_filter_rate_table[
>  					(chip->config >> 6) & 0x3][0];
> +			ret = IIO_VAL_INT;
>  			break;
>  		default:
>  			ret = -EINVAL;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ