From: sashiko-bot@kernel.org
To: "Petar Stepanovic" <pstepanovic@axiado.com>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v3 2/2] iio: adc: add Axiado SARADC driver
Date: Mon, 22 Jun 2026 07:54:57 +0000 [thread overview]
Message-ID: <20260622075457.7E6661F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260622-axiado-ax3000-ax3005-saradc-v3-2-e57c7c7ae675@axiado.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Incorrect error code passed to dev_err_probe() causes probe to incorrectly succeed on regulator failure, leading to a zombie device.
--
commit e9d35c0c4f9ed7b92e86089b5cd8263bb84313d2
Author: Petar Stepanovic <pstepanovic@axiado.com>
iio: adc: add Axiado SARADC driver
This patch adds support for the SARADC controller found on Axiado AX3000
and AX3005 SoCs. The driver supports single-shot voltage reads through
the IIO subsystem, using SoC match data to determine the available input
channels.
> diff --git a/drivers/iio/adc/axiado_saradc.c b/drivers/iio/adc/axiado_saradc.c
> new file mode 100644
> index 0000000000000..12efe814318c5
> --- /dev/null
> +++ b/drivers/iio/adc/axiado_saradc.c
[ ... ]
> +static int axiado_saradc_probe(struct platform_device *pdev)
> +{
[ ... ]
> + info->clk_rate = clk_get_rate(info->clk);
> + if (!info->clk_rate)
> + return dev_err_probe(dev, -EINVAL, "invalid clock rate\n");
> +
> + ret = devm_regulator_get_enable_read_voltage(dev, "vref");
> + if (ret < 0)
> + return dev_err_probe(dev, info->vref_uV,
> + "failed to get vref voltage\n");
[Severity: High]
Does this error path incorrectly return 0 on failure?
Because info was allocated via devm_iio_device_alloc(), info->vref_uV is 0
before being assigned. Passing info->vref_uV to dev_err_probe() instead of
ret causes dev_err_probe() to return 0.
Will this result in the probe function returning success on regulator
failure, leaving the driver bound to a non-functional device and
silently dropping valid probe deferrals?
> + info->vref_uV = ret;
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260622-axiado-ax3000-ax3005-saradc-v3-0-e57c7c7ae675@axiado.com?part=2
next prev parent reply other threads:[~2026-06-22 7:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-22 7:47 [PATCH v3 0/2] iio: adc: Add Axiado SARADC driver Petar Stepanovic
2026-06-22 7:47 ` [PATCH v3 1/2] dt-bindings: iio: adc: add Axiado AX3000/AX3005 SARADC Petar Stepanovic
2026-06-22 7:53 ` sashiko-bot
2026-06-22 7:47 ` [PATCH v3 2/2] iio: adc: add Axiado SARADC driver Petar Stepanovic
2026-06-22 7:54 ` sashiko-bot [this message]
2026-06-22 9:55 ` Joshua Crofts
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=20260622075457.7E6661F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=pstepanovic@axiado.com \
--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 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.