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]
Date:   Sun, 7 Apr 2019 11:28:03 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Tomer Maimon <tmaimon77@...il.com>
Cc:     gregkh@...uxfoundation.org, knaack.h@....de, lars@...afoo.de,
        pmeerw@...erw.net, yuenn@...gle.com, venture@...gle.com,
        brendanhiggins@...gle.com, avifishman70@...il.com, joel@....id.au,
        linux-iio@...r.kernel.org, openbmc@...ts.ozlabs.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] iio: adc: modify NPCM ADC read reference voltage

On Sun,  7 Apr 2019 11:19:28 +0300
Tomer Maimon <tmaimon77@...il.com> wrote:

> Checking if regulator is valid before reading
> NPCM ADC regulator voltage to avoid system crash
> in a case the regulator is not valid.
> 
> Signed-off-by: Tomer Maimon <tmaimon77@...il.com>
Good catch.

Applied to the fixes-togreg branch of iio.git and marked for
stable.

Thanks,

Jonathan

> ---
>  drivers/iio/adc/npcm_adc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/npcm_adc.c b/drivers/iio/adc/npcm_adc.c
> index 9e25bbec9c70..193b3b81de4d 100644
> --- a/drivers/iio/adc/npcm_adc.c
> +++ b/drivers/iio/adc/npcm_adc.c
> @@ -149,7 +149,7 @@ static int npcm_adc_read_raw(struct iio_dev *indio_dev,
>  		}
>  		return IIO_VAL_INT;
>  	case IIO_CHAN_INFO_SCALE:
> -		if (info->vref) {
> +		if (!IS_ERR(info->vref)) {
>  			vref_uv = regulator_get_voltage(info->vref);
>  			*val = vref_uv / 1000;
>  		} else {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ