[PATCH RESEND] net: stmmac: drop the runtime PM reference on probe failure
Krzysztof Kozlowski
krzk at kernel.org
Tue Nov 3 02:39:50 PST 2026
On 03/11/2026 11:29, Wentao Liang wrote:
> __stmmac_dvr_probe() takes a runtime PM reference with
> pm_runtime_get_noresume() and enables runtime PM before registering the
> MDIO bus. The reference is only dropped on the success path, so a
> failure of the MDIO, PCS, phylink, devlink or netdev registration leaves
> the usage counter elevated. The device is never bound in that case, so
> stmmac_dvr_remove() never runs to release it.
>
> Drop the reference and disable runtime PM again on the common error path.
> Only disable runtime PM if this driver enabled it, because PCI devices
> already have it enabled by the PCI core.
>
> Fixes: 5ec55823438e ("net: stmmac: add clocks management for gmac driver")
> Cc: stable at vger.kernel.org
> Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex
Implement comments you received, instead of resending.
Best regards,
Krzysztof
More information about the linux-arm-kernel
mailing list