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: <20260131170806.6fde32a0@jic23-huawei>
Date: Sat, 31 Jan 2026 17:08:06 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Antoniu Miclaus <antoniu.miclaus@...log.com>
Cc: Lars-Peter Clausen <lars@...afoo.de>, Michael Hennerich
 <Michael.Hennerich@...log.com>, David Lechner <dlechner@...libre.com>, Nuno
 Sá <nuno.sa@...log.com>, Andy Shevchenko <andy@...nel.org>,
 <linux-iio@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] iio: frequency: admv4420: return proper error code from
 admv4420_calc_parameters()

On Fri, 30 Jan 2026 15:50:05 +0200
Antoniu Miclaus <antoniu.miclaus@...log.com> wrote:

> Return -EINVAL instead of -1 when no valid PLL parameters solution is
> found. Using standard kernel error codes ensures consistency and proper
> error propagation through the call chain.
> 
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@...log.com>
Applied to a local branch. I'll need to rebase on something sensible after
the merge window. For now I'll push out as testing.

Thanks

Jonathan

> ---
>  drivers/iio/frequency/admv4420.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/frequency/admv4420.c b/drivers/iio/frequency/admv4420.c
> index 3ae462b4f5c9..8748d9747639 100644
> --- a/drivers/iio/frequency/admv4420.c
> +++ b/drivers/iio/frequency/admv4420.c
> @@ -243,7 +243,7 @@ static int admv4420_calc_parameters(struct admv4420_state *st)
>  		st->n_counter.n_counter = 1;
>  	}
>  	if (!sol_found)
> -		return -1;
> +		return -EINVAL;
>  
>  	st->n_counter.int_val = div_u64_rem(st->n_counter.n_counter, 10, &st->n_counter.frac_val);
>  	st->n_counter.mod_val = 10;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ