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

Michael Dege <[email protected]>
Newsgroups org.kernel.vger.linux-renesas-soc,org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <TY4PR01MB142827F5B7F90EB74FE33CB8382A62@TY4PR01MB14282.jpnprd01.prod.outlook.com>
Hi Jiawen,

Thank you for your patch.

> -----Original Message-----
> From: Jiawen Liu <[email protected]>
> Sent: Tuesday, August 18, 2026 2:42 PM
> To: Andrew Lunn <[email protected]>; David S. Miller <[email protected]>; Eric Dumazet
> <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>;
> [email protected]; [email protected]; [email protected]
> Cc: Yoshihiro Shimoda <[email protected]>; jiawen <[email protected]>
> Subject: [PATCH] net: renesas: rswitch-main: fix runtime PM cleanup
> 
> [You don't often get email from [email protected]. Learn why this is important at
> https://aka.ms/LearnAboutSenderIdentification ]
> 
> From: jiawen <[email protected]>
> 
> 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 <[email protected]>

Reviewed-by: Michael Dege <[email protected] >

> ---
> 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;
>         }
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.