RE: [PATCH] net: renesas: rswitch-main: fix runtime PM cleanup

From: Michael Dege

Date: Tue Aug 18 2026 - 09:02:50 EST


Hi Jiawen,

Thank you for your patch.

> -----Original Message-----
> From: Jiawen Liu <1298662399@xxxxxx>
> Sent: Tuesday, August 18, 2026 2:42 PM
> To: Andrew Lunn <andrew+netdev@xxxxxxx>; David S. Miller <davem@xxxxxxxxxxxxx>; Eric Dumazet
> <edumazet@xxxxxxxxxx>; Jakub Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>;
> netdev@xxxxxxxxxxxxxxx; linux-renesas-soc@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>; jiawen <1298662399@xxxxxx>
> Subject: [PATCH] net: renesas: rswitch-main: fix runtime PM cleanup
>
> [You don't often get email from 1298662399@xxxxxx. Learn why this is important at
> https://aka.ms/LearnAboutSenderIdentification ]
>
> From: jiawen <1298662399@xxxxxx>
>
> Update renesas_eth_sw_probe() for the confirmed driver lifecycle defect.
>
> Keep the change limited to the concrete operation shown in the final patch.
>
> Signed-off-by: jiawen <1298662399@xxxxxx>

Reviewed-by: Michael Dege <Michael.dege@xxxxxxxxxxx >

> ---
> diff --git a/drivers/net/ethernet/renesas/rswitch_main.c b/drivers/net/ethernet/renesas/rswitch_main.c
> --- a/drivers/net/ethernet/renesas/rswitch_main.c
> +++ b/drivers/net/ethernet/renesas/rswitch_main.c
> @@ -2123,6 +2123,8 @@
> { /* Sentinel */ }
> };
>
> +static void rswitch_deinit(struct rswitch_private *priv);
> +
> static int renesas_eth_sw_probe(struct platform_device *pdev) {
> const struct soc_device_attribute *attr; @@ -2194,6 +2196,9 @@
> ret = rswitch_register_notifiers();
> if (ret) {
> dev_err(&pdev->dev, "could not register notifiers\n");
> + rswitch_deinit(priv);
> + pm_runtime_put(&pdev->dev);
> + pm_runtime_disable(&pdev->dev);
> return ret;
> }
>
>