From: Joshua Crofts <joshua.crofts1@gmail.com>
To: Rodrigo Alencar via B4 Relay
<devnull+rodrigo.alencar.analog.com@kernel.org>
Cc: rodrigo.alencar@analog.com,
Michael Auchter <michael.auchter@ni.com>,
linux@analog.com, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-hardening@vger.kernel.org,
Michael Hennerich <Michael.Hennerich@analog.com>,
Jonathan Cameron <jic23@kernel.org>,
David Lechner <dlechner@baylibre.com>,
Andy Shevchenko <andy@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
Kees Cook <kees@kernel.org>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
sashiko-bot@kernel.org
Subject: Re: [PATCH v8 2/8] iio: dac: ad5686: missing NULL check on match data
Date: Thu, 16 Jul 2026 15:05:09 +0200 [thread overview]
Message-ID: <20260716150509.00002557@gmail.com> (raw)
In-Reply-To: <20260716-ad5686-new-features-v8-2-ebb0051af5e5@analog.com>
On Thu, 16 Jul 2026 13:14:18 +0100
Rodrigo Alencar via B4 Relay <devnull+rodrigo.alencar.analog.com@kernel.org> wrote:
> From: Rodrigo Alencar <rodrigo.alencar@analog.com>
>
> Verify that chip_info pointer is not NULL. If a user binds the driver
> using driver_override via sysfs with a device name not present in the
> id_table or of_match_table, match data will be NULL.
>
> Fixes: 0eb1728461a1 ("iio: dac: ad5686: drop enum id")
> Reported-by: sashiko-bot@kernel.org
> Closes: https://lore.kernel.org/all/20260710113149.53EC51F000E9@smtp.kernel.org/
> Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com>
> ---
> drivers/iio/dac/ad5686.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/iio/dac/ad5686.c b/drivers/iio/dac/ad5686.c
> index 713fe71ad1e7..d34250647aa4 100644
> --- a/drivers/iio/dac/ad5686.c
> +++ b/drivers/iio/dac/ad5686.c
> @@ -479,6 +479,9 @@ int ad5686_probe(struct device *dev,
> struct iio_dev *indio_dev;
> int ret, i;
>
> + if (!chip_info)
> + return -ENODEV;
> +
> indio_dev = devm_iio_device_alloc(dev, sizeof(*st));
> if (indio_dev == NULL)
> return -ENOMEM;
>
LGTM.
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
--
Kind regards
CJD
next prev parent reply other threads:[~2026-07-16 13:05 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 12:14 [PATCH v8 0/8] New features for the AD5686 IIO driver Rodrigo Alencar via B4 Relay
2026-07-16 12:14 ` Rodrigo Alencar
2026-07-16 12:14 ` [PATCH v8 1/8] iio: dac: ad5696: properly check i2c_transfer() return value Rodrigo Alencar via B4 Relay
2026-07-16 12:14 ` Rodrigo Alencar
2026-07-16 12:28 ` sashiko-bot
2026-07-16 12:14 ` [PATCH v8 2/8] iio: dac: ad5686: missing NULL check on match data Rodrigo Alencar via B4 Relay
2026-07-16 12:14 ` Rodrigo Alencar
2026-07-16 12:27 ` sashiko-bot
2026-07-16 13:05 ` Joshua Crofts [this message]
2026-07-16 18:42 ` Andy Shevchenko
2026-07-16 19:08 ` Joshua Crofts
2026-07-16 12:14 ` [PATCH v8 3/8] iio: dac: ad5686: refactor command/data macros Rodrigo Alencar via B4 Relay
2026-07-16 12:14 ` Rodrigo Alencar
2026-07-16 12:14 ` [PATCH v8 4/8] iio: dac: ad5686: introduce sync operation Rodrigo Alencar via B4 Relay
2026-07-16 12:14 ` Rodrigo Alencar
2026-07-16 12:14 ` [PATCH v8 5/8] iio: dac: ad5686: implement new sync() op for the spi bus Rodrigo Alencar via B4 Relay
2026-07-16 12:14 ` Rodrigo Alencar
2026-07-16 12:32 ` sashiko-bot
2026-07-16 12:14 ` [PATCH v8 6/8] iio: dac: ad5686: read_raw/write_raw: use guard(mutex)() Rodrigo Alencar via B4 Relay
2026-07-16 12:14 ` Rodrigo Alencar
2026-07-16 12:14 ` [PATCH v8 7/8] iio: dac: ad5686: add triggered buffer support Rodrigo Alencar via B4 Relay
2026-07-16 12:14 ` Rodrigo Alencar
2026-07-16 12:14 ` [PATCH v8 8/8] iio: dac: ad5686: add gain control support Rodrigo Alencar via B4 Relay
2026-07-16 12:14 ` Rodrigo Alencar
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=20260716150509.00002557@gmail.com \
--to=joshua.crofts1@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=devnull+rodrigo.alencar.analog.com@kernel.org \
--cc=dlechner@baylibre.com \
--cc=gustavoars@kernel.org \
--cc=jic23@kernel.org \
--cc=kees@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@analog.com \
--cc=michael.auchter@ni.com \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=rodrigo.alencar@analog.com \
--cc=sashiko-bot@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.