[PATCH v3] soc: ti: knav_qmss_queue: free resources in remove callback

Nishanth Menon nm at ti.com
Wed May 6 07:03:48 PDT 2026


On 02:46-20260506, Md Shofiqul Islam wrote:
> Implement the TODO in knav_queue_remove() by stopping PDSPs and
> freeing queue regions and queue ranges before disabling runtime PM,
> mirroring the cleanup performed in the probe error path.
> 
> This ensures resources are released on driver unbind and avoids
> leaking queue/region state.

Missing Signed-off-by -> please run checkpatch --strict.

ERROR: Missing Signed-off-by: line by nominal patch author 'Md Shofiqul Islam <shofiqtest at gmail.com>'

> ---
>  drivers/soc/ti/knav_qmss_queue.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c
> index 86d7a9c9a..8d8245352 100644
> --- a/drivers/soc/ti/knav_qmss_queue.c
> +++ b/drivers/soc/ti/knav_qmss_queue.c
> @@ -1873,7 +1873,11 @@ static int knav_queue_probe(struct platform_device *pdev)
>  
>  static void knav_queue_remove(struct platform_device *pdev)
>  {
> -	/* TODO: Free resources */
> +	struct knav_device *kdev = platform_get_drvdata(pdev);
> +
I suggest adding:
	device_ready = false;
> +	knav_queue_stop_pdsps(kdev);
> +	knav_queue_free_regions(kdev);
> +	knav_free_queue_ranges(kdev);
>  	pm_runtime_put_sync(&pdev->dev);
>  	pm_runtime_disable(&pdev->dev);
>  }
> -- 
> 2.51.1
> 

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
https://ti.com/opensource



More information about the linux-arm-kernel mailing list