[PATCH v2] PCI: mt7621: Release port reset controls on host registration failure

Sergio Paracuellos sergio.paracuellos at gmail.com
Thu Dec 3 06:54:51 PST 2026


On Thu, Dec 3, 2026 at 3:51 PM Yige Jiang <yigejiang86 at gmail.com> wrote:
>
> mt7621_pcie_parse_port() takes an exclusive reset control for each
> root port. If pci_host_probe() fails, mt7621_pcie_probe() returns the
> error from mt7621_pcie_register_host() without releasing the reset
> controls for the ports on pcie->ports. A subsequent probe can then
> fail to acquire those controls.
>
> Use the existing remove_resets path on host registration failure to
> release the controls and return the original error.
>
> Fixes: 2bdd5238e756 ("PCI: mt7621: Add MediaTek MT7621 PCIe host controller driver")
> Cc: stable at vger.kernel.org
> Signed-off-by: Yige Jiang <yigejiang86 at gmail.com>
> ---
> Changes in v2:
> - Drop the change to the device tree parsing error path, as requested
>   by Sergio Paracuellos.
>
> v1: https://lore.kernel.org/r/rc-b1-20261110-vc-184-61b6257957f3@gmail.com/
> Review: https://lore.kernel.org/r/CAMhs-H_Yd4L9jyYvH+BJy5BDSPO8AQy6X5vFFaR50eqS_UxAkw@mail.gmail.com/
>
>  drivers/pci/controller/pcie-mt7621.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

Reviewed-by: Sergio Paracuellos <sergio.paracuellos at gmail.com>

Thanks,
    Sergio Paracuellos



More information about the linux-arm-kernel mailing list