From c87eb8b8d9adb4d1f31dd213ee058bd8afe52b49 Mon Sep 17 00:00:00 2001 From: Abhinaya Agrawal Date: Tue, 17 May 2022 14:26:31 -0700 Subject: [PATCH] drivers: Fix host1x and nvhost debugfs cleanup Both host1x and nvhost expose APIs that deinitialize the debugfs and remove debugfs files/directories that were created. At present, debugfs_remove() is inovked to do this. However, debugfs_remove_recursive() should instead be used to ensure that all files within a debugfs are recursively removed before the directory is removed. Bug 3662478 Change-Id: Idb7d1458c02f57f6d656a7bfe1df3adf5e0497aa Signed-off-by: Abhinaya Agrawal Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2714042 Reviewed-by: svcacv Reviewed-by: svc_kernel_abi Reviewed-by: Omar Nemri GVS: Gerrit_Virtual_Submit --- drivers/gpu/host1x-nvhost/nvhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/host1x-nvhost/nvhost.c b/drivers/gpu/host1x-nvhost/nvhost.c index 65a9a6a7..502d6c6a 100644 --- a/drivers/gpu/host1x-nvhost/nvhost.c +++ b/drivers/gpu/host1x-nvhost/nvhost.c @@ -629,7 +629,7 @@ void nvhost_module_deinit(struct platform_device *pdev) falcon_exit(falcon); } - debugfs_remove(pdata->debugfs); + debugfs_remove_recursive(pdata->debugfs); } EXPORT_SYMBOL(nvhost_module_deinit);