From: Jonathan Cameron <jic23@kernel.org>
To: Angelo Dureghello <adureghello@baylibre.com>
Cc: Nuno Sa <nuno.sa@analog.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Michael Hennerich <Michael.Hennerich@analog.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: dac: adi-axi-dac: add io_mode check
Date: Sat, 22 Feb 2025 17:16:07 +0000 [thread overview]
Message-ID: <20250222171607.3dfbe6c6@jic23-huawei> (raw)
In-Reply-To: <20250219-wip-bl-axi-dac-add-enum-check-v1-1-8de9db0b3b1b@baylibre.com>
On Wed, 19 Feb 2025 19:57:43 +0100
Angelo Dureghello <adureghello@baylibre.com> wrote:
> From: Angelo Dureghello <adureghello@baylibre.com>
>
> Add safe check to the high bound of the enum values,
>
> Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
> ---
Applied. thanks!
Jonathan
> drivers/iio/dac/adi-axi-dac.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/iio/dac/adi-axi-dac.c b/drivers/iio/dac/adi-axi-dac.c
> index 009fb987e1afd04c3dbc59a9742f7982744420c2..892d770aec69c4259de777058801c9ab33c79923 100644
> --- a/drivers/iio/dac/adi-axi-dac.c
> +++ b/drivers/iio/dac/adi-axi-dac.c
> @@ -728,6 +728,9 @@ static int axi_dac_bus_set_io_mode(struct iio_backend *back,
> struct axi_dac_state *st = iio_backend_get_priv(back);
> int ival, ret;
>
> + if (mode > AD3552R_IO_MODE_QSPI)
> + return -EINVAL;
> +
> guard(mutex)(&st->lock);
>
> ret = regmap_update_bits(st->regmap, AXI_DAC_CUSTOM_CTRL_REG,
>
> ---
> base-commit: 4dd0ce442fa57f5274878c89223362344f28224c
> change-id: 20250219-wip-bl-axi-dac-add-enum-check-8bb617285793
>
> Best regards,
prev parent reply other threads:[~2025-02-22 17:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-19 18:57 [PATCH] iio: dac: adi-axi-dac: add io_mode check Angelo Dureghello
2025-02-22 17:16 ` 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=20250222171607.3dfbe6c6@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=adureghello@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