From: Jonathan Cameron <jic23@kernel.org>
To: Antoniu Miclaus <antoniu.miclaus@analog.com>
Cc: "Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: frequency: admv4420: return proper error code from admv4420_calc_parameters()
Date: Sat, 31 Jan 2026 17:08:06 +0000 [thread overview]
Message-ID: <20260131170806.6fde32a0@jic23-huawei> (raw)
In-Reply-To: <20260130135005.136363-1-antoniu.miclaus@analog.com>
On Fri, 30 Jan 2026 15:50:05 +0200
Antoniu Miclaus <antoniu.miclaus@analog.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@analog.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;
prev parent reply other threads:[~2026-01-31 17:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-30 13:50 Antoniu Miclaus
2026-01-31 17:08 ` Jonathan Cameron [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260131170806.6fde32a0@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=antoniu.miclaus@analog.com \
--cc=dlechner@baylibre.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®