[PATCH 1/2] coresight: Fix clock refcount imbalance on platform remove

Leo Yan leo.yan at arm.com
Thu Jul 2 01:28:16 PDT 2026


On Thu, Jul 02, 2026 at 09:56:05AM +0800, Jie Gan wrote:

>  static void funnel_platform_remove(struct platform_device *pdev)
>  {
>         struct funnel_drvdata *drvdata = dev_get_drvdata(&pdev->dev);
> 
>         if (WARN_ON(!drvdata))
>                 return;
> 
> -       funnel_remove(&pdev->dev);
> +       /*
> +        * Resume the device so its clocks are enabled again, balancing the
> +        * clk_disable_unprepare() that devm runs when the driver detaches.
> +        * Then mark it suspended and drop the usage count taken here.
> +        */
>         pm_runtime_get_sync(&pdev->dev);
> +       funnel_remove(&pdev->dev);
>         pm_runtime_disable(&pdev->dev);
> +       pm_runtime_set_suspended(&pdev->dev);
> +       pm_runtime_put_noidle(&pdev->dev);

LGTM. Thanks for writing up the comment. Please proceed.



More information about the linux-arm-kernel mailing list