diff --git a/drivers/cam_req_mgr/cam_mem_mgr.c b/drivers/cam_req_mgr/cam_mem_mgr.c index 97a6c8b1b094..e0ce16a794c0 100644 --- a/drivers/cam_req_mgr/cam_mem_mgr.c +++ b/drivers/cam_req_mgr/cam_mem_mgr.c @@ -955,6 +955,7 @@ void cam_mem_mgr_deinit(void) { atomic_set(&cam_mem_mgr_state, CAM_MEM_MGR_UNINITIALIZED); cam_mem_mgr_cleanup_table(); + debugfs_remove_recursive(tbl.dentry); mutex_lock(&tbl.m_lock); bitmap_zero(tbl.bitmap, tbl.bits); kfree(tbl.bitmap); diff --git a/drivers/cam_req_mgr/cam_req_mgr_debug.c b/drivers/cam_req_mgr/cam_req_mgr_debug.c index 6b6a91b6303b..89b55d937667 100644 --- a/drivers/cam_req_mgr/cam_req_mgr_debug.c +++ b/drivers/cam_req_mgr/cam_req_mgr_debug.c @@ -141,6 +141,5 @@ int cam_req_mgr_debug_register(struct cam_req_mgr_core_device *core_dev) void cam_req_mgr_debug_unregister(void) { - if (!debugfs_root) - debugfs_remove_recursive(debugfs_root); + debugfs_remove_recursive(debugfs_root); }