From: sashiko-bot@kernel.org
To: "Rosen Penev" <rosenp@gmail.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCHv2 3/3] ARM: dts: helios4: add SATA regulator supplies
Date: Thu, 09 Jul 2026 01:02:11 +0000 [thread overview]
Message-ID: <20260709010212.3D7C41F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260709005005.1587852-4-rosenp@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The struct device reference acquired by of_find_device_by_node() is never released, causing a memory leak.
--
--- Patch [1]: [PATCHv2 3/3] ARM: dts: helios4: add SATA regulator supplies ---
commit 737d149c64d97348e97b79fed6b2378d4f1a140f
Author: Rosen Penev <rosenp@gmail.com>
ARM: dts: helios4: add SATA regulator supplies
The ahci-mvebu driver and libahci_platform request three supplies
on SATA controller and port nodes to avoid regulator core boot notices.
The SATA controller and PHY are powered by the 3.3V I/O rail, while the
four disk bays are powered by the 5V HDD rail.
> diff --git a/arch/arm/boot/dts/marvell/armada-388-helios4.dts b/arch/arm/boot/dts/marvell/armada-388-helios4.dts
> index ec134e22bae3e..af1e81638f829 100644
> --- a/arch/arm/boot/dts/marvell/armada-388-helios4.dts
> +++ b/arch/arm/boot/dts/marvell/armada-388-helios4.dts
> @@ -217,13 +217,17 @@ sata@a8000 {
> status = "okay";
> #address-cells = <1>;
> #size-cells = <0>;
> + ahci-supply = <®_3p3v>;
> + phy-supply = <®_3p3v>;
>
> sata0: sata-port@0 {
> reg = <0>;
> + target-supply = <®_5p0v_hdd>;
[Severity: High]
This is a pre-existing issue and was not introduced by this patch, but doesn't
adding these supplies increase the chance of memory leaks during probe
deferrals?
In drivers/ata/libahci_platform.c:ahci_platform_get_resources(), the device
reference acquired by of_find_device_by_node() is never released:
port_dev = of_find_device_by_node(child);
if (port_dev) {
rc = ahci_platform_get_regulator(hpriv, port,
&port_dev->dev);
if (rc == -EPROBE_DEFER)
goto err_out;
}
If the newly added target-supply regulators return -EPROBE_DEFER, the probe
fails and is retried. This unconditionally leaks a struct platform_device
reference on every retry because put_device() is never called for port_dev.
> };
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260709005005.1587852-4-rosenp@gmail.com?part=1
next prev parent reply other threads:[~2026-07-09 1:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 0:50 [PATCHv2 0/3] ARM: dts: helios4: add regulator supplies Rosen Penev
2026-07-09 0:50 ` [PATCHv2 1/3] ARM: dts: helios4: add vcc-supply to EEPROM Rosen Penev
2026-07-09 0:50 ` [PATCHv2 2/3] ARM: dts: helios4: add vcc-supply to GPIO expander Rosen Penev
2026-07-09 0:50 ` [PATCHv2 3/3] ARM: dts: helios4: add SATA regulator supplies Rosen Penev
2026-07-09 1:02 ` sashiko-bot [this message]
2026-07-12 21:34 ` Rosen Penev
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=20260709010212.3D7C41F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=rosenp@gmail.com \
--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.