From: sashiko-bot@kernel.org
To: "Taha Ed-Dafili" <0rayn.dev@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v5 4/6] iio: dac: ad5504: remove legacy platform data support
Date: Fri, 21 Aug 2026 10:36:46 +0000 [thread overview]
Message-ID: <20260821103646.8A4671F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260821102452.37407-5-0rayn.dev@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The driver unconditionally dereferences `spi_get_device_id()` without checking for NULL.
--
--- Patch [4]: [PATCH v5 4/6] iio: dac: ad5504: remove legacy platform data support ---
commit 71e5a82418860f4a272cfaab189a444dee114159
Author: Taha Ed-Dafili <0rayn.dev@gmail.com>
iio: dac: ad5504: remove legacy platform data support
This commit removes the legacy platform data support from the AD5504 driver
since there are no in-tree users. It drops the ad5504_platform_data
structure and updates the probe logic to treat the vcc regulator as
mandatory on non-ACPI systems.
> diff --git a/drivers/iio/dac/ad5504.c b/drivers/iio/dac/ad5504.c
> index 830b8ea8eaebf..96ab6d456d80e 100644
> --- a/drivers/iio/dac/ad5504.c
> +++ b/drivers/iio/dac/ad5504.c
> @@ -296,16 +294,11 @@ static int ad5504_probe(struct spi_device *spi)
[ ... ]
> }
>
> st->spi = spi;
> indio_dev->name = spi_get_device_id(st->spi)->name;
> indio_dev->info = &ad5504_info;
> if (spi_get_device_id(st->spi)->driver_data == ID_AD5501)
[Severity: High]
This is a pre-existing issue, but does this code unconditionally dereference
the return value of spi_get_device_id() in ad5504_probe()?
If a privileged user writes an unmatched device name to the driver's sysfs
bind or driver_override interface, it forces a driver match via
device_match_driver_override(). Because the device's modalias might not be
in the driver's id_table, spi_match_id() would return NULL.
Could this sequence lead to spi_get_device_id() returning NULL and causing
a kernel panic when its name or driver_data fields are accessed here?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260821102452.37407-1-0rayn.dev@gmail.com?part=4
next prev parent reply other threads:[~2026-08-21 10:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 10:24 [PATCH v5 0/6] iio: dac: ad5504: bindings, cleanups, locking, and scale fixes Taha Ed-Dafili
2026-08-21 10:24 ` [PATCH v5 1/6] dt-bindings: iio: dac: ad5504: add output-range and missing gpios Taha Ed-Dafili
2026-08-21 10:36 ` sashiko-bot
2026-08-21 10:24 ` [PATCH v5 2/6] iio: dac: ad5504: Align headers with IWYU principle Taha Ed-Dafili
2026-08-21 10:24 ` [PATCH v5 3/6] iio: dac: ad5504: separate ACPI and DT paths Taha Ed-Dafili
2026-08-21 11:20 ` Joshua Crofts
2026-08-21 11:41 ` [PATCH v5 3/6] iio: dac: ad5504: strictly separate ACPI and DT probe paths Taha Ed-Dafili
2026-08-21 11:58 ` Joshua Crofts
2026-08-21 10:24 ` [PATCH v5 4/6] iio: dac: ad5504: remove legacy platform data support Taha Ed-Dafili
2026-08-21 10:36 ` sashiko-bot [this message]
2026-08-21 10:24 ` [PATCH v5 5/6] iio: dac: ad5504: introduce local lock to protect state and spi transfers Taha Ed-Dafili
2026-08-21 13:31 ` Andy Shevchenko
2026-08-21 14:05 ` Taha Ed-Dafili
2026-08-21 10:24 ` [PATCH v5 6/6] iio: dac: ad5504: support scale via output-range-microvolt property Taha Ed-Dafili
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=20260821103646.8A4671F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=0rayn.dev@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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