Skip to content

Commit dd62245

Browse files
Allen Hubbejonmason
authored andcommitted
NTB: ntb_transport: fix debugfs_remove_recursive
The call to debugfs_remove_recursive(qp->debugfs_dir) of the sub-level directory must not be later than debugfs_remove_recursive(nt_debugfs_dir) of the top-level directory. Otherwise, the sub-level directory will not exist, and it would be invalid (panic) to attempt to remove it. This removes the top-level directory last, after sub-level directories have been cleaned up. Signed-off-by: Allen Hubbe <[email protected]> Fixes: e26a584 ("NTB: Split ntb_hw_intel and ntb_transport drivers") Signed-off-by: Jon Mason <[email protected]>
1 parent 7089db8 commit dd62245

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/ntb/ntb_transport.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2273,9 +2273,8 @@ module_init(ntb_transport_init);
22732273

22742274
static void __exit ntb_transport_exit(void)
22752275
{
2276-
debugfs_remove_recursive(nt_debugfs_dir);
2277-
22782276
ntb_unregister_client(&ntb_transport_client);
22792277
bus_unregister(&ntb_transport_bus);
2278+
debugfs_remove_recursive(nt_debugfs_dir);
22802279
}
22812280
module_exit(ntb_transport_exit);

0 commit comments

Comments
 (0)