[PATCH 4/4] net: stmmac: manage error case during stmmac_dvr_probe

Maxime Chevallier maxime.chevallier at bootlin.com
Tue Aug 4 07:16:24 PDT 2026


Hi Christophe,

On 8/4/26 15:20, Christophe Roullier wrote:
> In case of error during stmmac_mdio_register, pm_runtime is not
> cleaning before exit probe.
> 
> Signed-off-by: Christophe Roullier <christophe.roullier at foss.st.com>
> Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>

Can you send this path to the proper networking tree ? Is it a bug you've
encountered in the wild (like, eprobedefer or something ?) or just
something you've noticed ?

If this is something you encountered, let's send it to -net (and it would
need a Fixes tag), otherwise just target that to net-next

Thanks :)

Maxime

> ---
>  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 0de4bc949913..852de0f51c09 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -8062,6 +8062,8 @@ static int __stmmac_dvr_probe(struct device *device,
>  error_pcs_setup:
>  	stmmac_mdio_unregister(ndev);
>  error_mdio_register:
> +	pm_runtime_put_sync(device);
> +	pm_runtime_disable(device);
>  	stmmac_napi_del(ndev);
>  error_hw_init:
>  	destroy_workqueue(priv->wq);




More information about the linux-arm-kernel mailing list