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: <20240525173515.02b38d7a@jic23-huawei>
Date: Sat, 25 May 2024 17:35:31 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Alisa-Dariana Roman <alisadariana@...il.com>
Cc: andy@...nel.org, Jonathan.Cameron@...wei.com, alisa.roman@...log.com,
 bigunclemax@...il.com, broonie@...nel.org, conor+dt@...nel.org,
 devicetree@...r.kernel.org, dlechner@...libre.com, fr0st61te@...il.com,
 krzysztof.kozlowski+dt@...aro.org, lars@...afoo.de, lgirdwood@...il.com,
 liambeguin@...il.com, linux-iio@...r.kernel.org,
 linux-kernel@...r.kernel.org, marcelo.schmitt@...log.com,
 marcus.folkesson@...il.com, michael.hennerich@...log.com,
 nuno.sa@...log.com, okan.sahin@...log.com, robh@...nel.org,
 schnelle@...ux.ibm.com
Subject: Re: [PATCH] fix

On Wed, 22 May 2024 12:50:23 +0300
Alisa-Dariana Roman <alisadariana@...il.com> wrote:

> ---
> 
> Would this fix be alright, since writing something like if(!ret) may be
> confusing?
> 
Looks fine to me. Squashed into original commit that I messed up.

Thanks for sorting this out.

Jonathan

> And regarding the comment, my bad, there is nothing wrong there.
> 
>  drivers/iio/adc/ad7192.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/iio/adc/ad7192.c b/drivers/iio/adc/ad7192.c
> index 101afce49378..0789121236d6 100644
> --- a/drivers/iio/adc/ad7192.c
> +++ b/drivers/iio/adc/ad7192.c
> @@ -1101,14 +1101,12 @@ static int ad7194_parse_channels(struct iio_dev *indio_dev)
>  		ret = fwnode_property_read_u32_array(child, "diff-channels",
>  						     ain, ARRAY_SIZE(ain));
>  		if (ret == 0) {
> -			ret = ad7194_validate_ain_channel(dev, ain[0]);
> -			if (ret)
> +			if (!ad7194_validate_ain_channel(dev, ain[0]))
>  				return dev_err_probe(dev, -EINVAL,
>  						     "Invalid AIN channel: %u\n",
>  						     ain[0]);
>  
> -			ret = ad7194_validate_ain_channel(dev, ain[1]);
> -			if (ret)
> +			if (!ad7194_validate_ain_channel(dev, ain[1]))
>  				return dev_err_probe(dev, -EINVAL,
>  						     "Invalid AIN channel: %u\n",
>  						     ain[1]);
> @@ -1125,8 +1123,7 @@ static int ad7194_parse_channels(struct iio_dev *indio_dev)
>  				return dev_err_probe(dev, ret,
>  						     "Missing channel property\n");
>  
> -			ret = ad7194_validate_ain_channel(dev, ain[0]);
> -			if (ret)
> +			if (!ad7194_validate_ain_channel(dev, ain[0]))
>  				return dev_err_probe(dev, -EINVAL,
>  						     "Invalid AIN channel: %u\n",
>  						     ain[0]);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ