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

Maxime Chevallier <[email protected]> Tue, 4 Aug 2026 16:16:24 +0200
Newsgroups gmane.linux.kernel,gmane.linux.network,gmane.linux.ports.arm.kernel
Message-ID <[email protected]>
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 <[email protected]>
> Reviewed-by: Russell King (Oracle) <[email protected]>

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);