[PATCH] PCI: mt7621: Fix reset control leak on PHY initialization failure

Sergio Paracuellos sergio.paracuellos at gmail.com
Sun Nov 1 01:57:02 PDT 2026


On Sun, Nov 1, 2026 at 8:02 AM Sreeraj S Kurup
<sreekuttan2156239 at gmail.com> wrote:
>
> The PCIe port initialization code acquires a reset control handle using
> of_reset_control_get_exclusive(). However, when PHY initialization or
> power-on fails, the port is removed from the PCIe port list without
> releasing the acquired reset control handle.
>
> Since the reset control cleanup iterates over the remaining ports in
> the list, the removed port's reset control handle is never released.
>
> Call reset_control_put() before removing the failed port from the list
> to ensure that the reset control resource is properly released.
>
> Fixes a resource leak on PCIe PHY initialization failure.
>
> Signed-off-by: Sreeraj S Kurup <sreekuttan2156239 at gmail.com>
> ---
>  drivers/pci/controller/pcie-mt7621.c | 1 +
>  1 file changed, 1 insertion(+)

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

Thanks,
    Sergio Paracuellos



More information about the linux-arm-kernel mailing list