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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220819180856.5a1d4e5a@jic23-huawei>
Date:   Fri, 19 Aug 2022 18:08:56 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Antoniu Miclaus <antoniu.miclaus@...log.com>
Cc:     <linux-kernel@...r.kernel.org>, <linux-iio@...r.kernel.org>
Subject: Re: [PATCH] iio: frequency: admv1014: return -EINVAL directly

On Fri, 19 Aug 2022 13:41:17 +0300
Antoniu Miclaus <antoniu.miclaus@...log.com> wrote:

> Remove extra step where the error code is assigned to the `ret`
> variable.
> 
> Return instead error code directly.
> 
> Fixes: f4eb9ac ("iio: frequency: admv1014: add support for ADMV1014")
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@...log.com>
Change is fine, but I've dropped the fixes tag. The code before this
wasn't broken, just longer than it needed to be. We don't want the noise
of this getting backported because someone sees the fixes tag and thinks
there is a reason it needs to be.

Applied to the togreg branch of iio.git
Thanks,

Jonathan


 
> ---
>  drivers/iio/frequency/admv1014.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/frequency/admv1014.c b/drivers/iio/frequency/admv1014.c
> index 865addd10db4..bb5e1feef42b 100644
> --- a/drivers/iio/frequency/admv1014.c
> +++ b/drivers/iio/frequency/admv1014.c
> @@ -669,8 +669,7 @@ static int admv1014_init(struct admv1014_state *st)
>  	chip_id = FIELD_GET(ADMV1014_CHIP_ID_MSK, chip_id);
>  	if (chip_id != ADMV1014_CHIP_ID) {
>  		dev_err(&spi->dev, "Invalid Chip ID.\n");
> -		ret = -EINVAL;
> -		return ret;
> +		return -EINVAL;
>  	}
>  
>  	ret = __admv1014_spi_update_bits(st, ADMV1014_REG_QUAD,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ